Commit f03833e4 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents 6b102431 c969ae1b
--光の創造神 ホルアクティ --光の創造神 ホルアクティ
function c10000040.initial_effect(c) function c10000040.initial_effect(c)
aux.AddCodeList(c,10000010) aux.AddCodeList(c,10000010,10000000,10000020)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--トライアングル-O --トライアングル-O
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,7903368,58996839,84384943)
--destroy and damage --destroy and damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
......
--機動砦 ストロング・ホールド --機動砦 ストロング・ホールド
function c13955608.initial_effect(c) function c13955608.initial_effect(c)
aux.AddCodeList(c,41172955,86445415,13839120)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
...@@ -88,7 +88,7 @@ function c14457896.atlimit(e,c) ...@@ -88,7 +88,7 @@ function c14457896.atlimit(e,c)
return c:IsRace(RACE_INSECT) and c:IsFaceup() return c:IsRace(RACE_INSECT) and c:IsFaceup()
end end
function c14457896.disfilter(c,re) function c14457896.disfilter(c,re)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsRelateToEffect(re) return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsRelateToEffect(re)
end end
function c14457896.discon(e,tp,eg,ep,ev,re,r,rp) function c14457896.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
...@@ -8,25 +8,17 @@ function c14756848.initial_effect(c) ...@@ -8,25 +8,17 @@ function c14756848.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14756848.hspcon) e1:SetCondition(c14756848.hspcon)
e1:SetValue(SUMMON_VALUE_SELF) e1:SetOperation(c14756848.hspop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon limit --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c14756848.hspcon2) e2:SetCost(c14756848.descost)
e2:SetOperation(c14756848.hspop) e2:SetTarget(c14756848.destg)
e2:SetOperation(c14756848.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c14756848.descost)
e3:SetTarget(c14756848.destg)
e3:SetOperation(c14756848.desop)
c:RegisterEffect(e3)
end end
function c14756848.filter(c) function c14756848.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -37,14 +29,11 @@ function c14756848.hspcon(e,c) ...@@ -37,14 +29,11 @@ function c14756848.hspcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c14756848.filter,tp,LOCATION_GRAVE,0,1,nil) and not Duel.IsExistingMatchingCard(c14756848.filter,tp,LOCATION_GRAVE,0,1,nil)
end end
function c14756848.hspcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c14756848.hspop(e,tp,eg,ep,ev,re,r,rp) function c14756848.hspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c14756848.splimit) e1:SetTarget(c14756848.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
...@@ -48,6 +48,7 @@ function c1953925.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +48,7 @@ function c1953925.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if not rc:IsType(TYPE_TRAP) then return end if not rc:IsType(TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():IsRelateToEffect(re) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
......
...@@ -14,6 +14,9 @@ end ...@@ -14,6 +14,9 @@ end
function c1984618.tgfilter(c,tp) function c1984618.tgfilter(c,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c1984618.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetAttack()) return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c1984618.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetAttack())
end end
function c1984618.opfilter(c,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c1984618.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetAttack())
end
function c1984618.thfilter(c,atk) function c1984618.thfilter(c,atk)
return (c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) or c:IsCode(68468459)) and c:IsAttackBelow(atk) and c:IsAbleToHand() return (c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) or c:IsCode(68468459)) and c:IsAttackBelow(atk) and c:IsAbleToHand()
end end
...@@ -24,7 +27,7 @@ function c1984618.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +27,7 @@ function c1984618.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c1984618.activate(e,tp,eg,ep,ev,re,r,rp) function c1984618.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1984618.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c1984618.opfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local atk=tc:GetAttack() local atk=tc:GetAttack()
......
...@@ -36,6 +36,7 @@ c1995985.lvup={74388798} ...@@ -36,6 +36,7 @@ c1995985.lvup={74388798}
function c1995985.disop(e,tp,eg,ep,ev,re,r,rp) function c1995985.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsType(TYPE_SPELL) or rp==tp then return end if not re:GetHandler():IsType(TYPE_SPELL) or rp==tp then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():IsRelateToEffect(re) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
--必殺!黒蠍コンビネーション --必殺!黒蠍コンビネーション
function c20858318.initial_effect(c) function c20858318.initial_effect(c)
aux.AddCodeList(c,76922029,6967870,61587183,48768179,74153887)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -21,10 +21,10 @@ function c21441617.initial_effect(c) ...@@ -21,10 +21,10 @@ function c21441617.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21441617.spcon1(e,tp,eg,ep,ev,re,r,rp) function c21441617.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c21441617.spcon2(e,tp,eg,ep,ev,re,r,rp) function c21441617.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c21441617.spfilter(c,e,tp) function c21441617.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(21441617) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(21441617) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c23756165.filter(c) function c23756165.filter(c)
return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler()
...@@ -78,7 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -99,7 +99,7 @@ function c23756165.repval(e,re,r,rp) ...@@ -99,7 +99,7 @@ function c23756165.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp) function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id) return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN)
end end
function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
--おジャマジック --おジャマジック
function c24643836.initial_effect(c) function c24643836.initial_effect(c)
aux.AddCodeList(c,12482652,42941100,79335209)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24643836,0)) e1:SetDescription(aux.Stringid(24643836,0))
......
...@@ -48,12 +48,4 @@ function c28297833.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,12 +48,4 @@ function c28297833.rmop(e,tp,eg,ep,ev,re,r,rp)
g1:Merge(g2) g1:Merge(g2)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT) Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(500)
c:RegisterEffect(e1)
end
end end
...@@ -37,10 +37,10 @@ function c30741503.indcon(e) ...@@ -37,10 +37,10 @@ function c30741503.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c30741503.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c30741503.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c30741503.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c30741503.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c30741503.tdfilter(c) function c30741503.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
...@@ -42,10 +42,10 @@ function c3134857.indcon(e) ...@@ -42,10 +42,10 @@ function c3134857.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c3134857.tdfilter(c) function c3134857.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
...@@ -40,7 +40,7 @@ function c32909498.initial_effect(c) ...@@ -40,7 +40,7 @@ function c32909498.initial_effect(c)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,32909499) e4:SetCountLimit(1,32909499)
e4:SetCondition(c32909498.rmcon) e4:SetCondition(c32909498.rmcon)
e4:SetTarget(c32909498.rmtg) e4:SetTarget(c32909498.rmtg2)
e4:SetOperation(c32909498.rmop) e4:SetOperation(c32909498.rmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -83,3 +83,10 @@ end ...@@ -83,3 +83,10 @@ end
function c32909498.rmcon(e,tp,eg,ep,ev,re,r,rp) function c32909498.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end end
function c32909498.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c32909498.rmfilter(chkc,tp) end
if chk==0 then return rp==1-tp and Duel.IsExistingTarget(c32909498.rmfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c32909498.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c33026283.initial_effect(c) function c33026283.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,85360035,aux.FilterBoolFunction(Card.IsFusionSetCard,0x14f),2,true,false) aux.AddFusionProcCodeFun(c,85360035,aux.FilterBoolFunction(Card.IsFusionSetCard,0x14f),2,true,true)
--effect monster material check --effect monster material check
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
--エクゾディアとの契約 --エクゾディアとの契約
function c33244944.initial_effect(c) function c33244944.initial_effect(c)
aux.AddCodeList(c,8124921,44519536,70903634,7902349,33396948)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--クリベー --クリベー
function c34419588.initial_effect(c) function c34419588.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,44632120,71036835,7021574,40640057)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34419588,0)) e1:SetDescription(aux.Stringid(34419588,0))
......
...@@ -6,23 +6,15 @@ function c36523152.initial_effect(c) ...@@ -6,23 +6,15 @@ function c36523152.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetValue(SUMMON_VALUE_SELF)
e1:SetCondition(c36523152.spcon) e1:SetCondition(c36523152.spcon)
e1:SetOperation(c36523152.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon limit --double tribute
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DOUBLE_TRIBUTE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetValue(c36523152.condition)
e2:SetCondition(c36523152.limcon)
e2:SetOperation(c36523152.limop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--double tribute
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DOUBLE_TRIBUTE)
e3:SetValue(c36523152.condition)
c:RegisterEffect(e3)
end end
function c36523152.spcon(e,c) function c36523152.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -30,14 +22,11 @@ function c36523152.spcon(e,c) ...@@ -30,14 +22,11 @@ function c36523152.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end end
function c36523152.limcon(e,tp,eg,ep,ev,re,r,rp) function c36523152.spop(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c36523152.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c36523152.splimit) e1:SetTarget(c36523152.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
...@@ -29,10 +29,10 @@ function c4055337.indval(e,c) ...@@ -29,10 +29,10 @@ function c4055337.indval(e,c)
return c:IsType(TYPE_LINK) return c:IsType(TYPE_LINK)
end end
function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp) function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp) function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c4055337.tgfilter(c) function c4055337.tgfilter(c)
return c:IsFaceup() return c:IsFaceup()
......
...@@ -8,27 +8,19 @@ function c41141943.initial_effect(c) ...@@ -8,27 +8,19 @@ function c41141943.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c41141943.hspcon) e1:SetCondition(c41141943.hspcon)
e1:SetValue(SUMMON_VALUE_SELF) e1:SetOperation(c41141943.hspop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon limit --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c41141943.hspcon2) e2:SetCountLimit(1,41141943)
e2:SetOperation(c41141943.hspop) e2:SetCondition(c41141943.spcon)
e2:SetCost(c41141943.spcost)
e2:SetTarget(c41141943.sptg)
e2:SetOperation(c41141943.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,41141943)
e3:SetCondition(c41141943.spcon)
e3:SetCost(c41141943.spcost)
e3:SetTarget(c41141943.sptg)
e3:SetOperation(c41141943.spop)
c:RegisterEffect(e3)
end end
function c41141943.filter(c) function c41141943.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -39,14 +31,11 @@ function c41141943.hspcon(e,c) ...@@ -39,14 +31,11 @@ function c41141943.hspcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c41141943.filter,tp,LOCATION_GRAVE,0,1,nil) and not Duel.IsExistingMatchingCard(c41141943.filter,tp,LOCATION_GRAVE,0,1,nil)
end end
function c41141943.hspcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c41141943.hspop(e,tp,eg,ep,ev,re,r,rp) function c41141943.hspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c41141943.splimit) e1:SetTarget(c41141943.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
...@@ -30,6 +30,7 @@ end ...@@ -30,6 +30,7 @@ end
function c42868711.disop(e,tp,eg,ep,ev,re,r,rp) function c42868711.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():IsRelateToEffect(re) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
......
--デューテリオン --デューテリオン
function c43017476.initial_effect(c) function c43017476.initial_effect(c)
aux.AddCodeList(c,43017476,22587018,58071123)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43017476,0)) e1:SetDescription(aux.Stringid(43017476,0))
......
--クリバー --クリバー
function c44632120.initial_effect(c) function c44632120.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,71036835,7021574,34419588,40640057)
--Destroyed --Destroyed
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44632120,0)) e1:SetDescription(aux.Stringid(44632120,0))
......
--螺旋槍殺 --螺旋槍殺
function c49328340.initial_effect(c) function c49328340.initial_effect(c)
aux.AddCodeList(c,66889139) aux.AddCodeList(c,6368038,16589042,66889139)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -42,6 +42,7 @@ end ...@@ -42,6 +42,7 @@ end
function c49681811.disop(e,tp,eg,ep,ev,re,r,rp) function c49681811.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_SPELL) then return end if not re:IsActiveType(TYPE_SPELL) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():IsRelateToEffect(re) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
......
...@@ -56,7 +56,8 @@ function c49868263.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,8 @@ function c49868263.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c49868263.disop2(e,tp,eg,ep,ev,re,r,rp) function c49868263.disop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then if e:GetHandler():IsRelateToEffect(re)
and re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
if Duel.NegateEffect(ev,true) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and re:GetHandler():IsRelateToEffect(re) then
......
...@@ -15,7 +15,7 @@ function c50140163.initial_effect(c) ...@@ -15,7 +15,7 @@ function c50140163.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c50140163.eqcon1) e2:SetCondition(c50140163.eqcon1)
e2:SetTarget(c50140163.eqtg) e2:SetTarget(c50140163.eqtg)
e2:SetOperation(c50140163.eqop) e2:SetOperation(c50140163.eqop)
...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c50140163.filter(c) function c50140163.filter(c)
return c:IsAbleToChangeControler() return c:IsAbleToChangeControler()
...@@ -66,7 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
......
--古代の機械巨竜 --古代の機械巨竜
function c50933533.initial_effect(c) function c50933533.initial_effect(c)
aux.AddCodeList(c,41172955,86445415,13839120)
--mat check --mat check
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -17,7 +17,7 @@ function c55696885.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c55696885.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2) e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55696885,1)) e2:SetDescription(aux.Stringid(55696885,1))
......
...@@ -20,10 +20,10 @@ function c57835716.initial_effect(c) ...@@ -20,10 +20,10 @@ function c57835716.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c57835716.spcon1(e,tp,eg,ep,ev,re,r,rp) function c57835716.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c57835716.spcon2(e,tp,eg,ep,ev,re,r,rp) function c57835716.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c57835716.spfilter(c,e,tp) function c57835716.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(57835716) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(57835716) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -61,9 +61,12 @@ end ...@@ -61,9 +61,12 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,1-tc:GetControler(),tc:GetSequence()) local row,column=aux.GetFieldIndex(tc)
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLP(tp)<Duel.GetLP(1-tp) and #cg>0 if Duel.Destroy(tc,REASON_EFFECT)==0 or row<0 or column<0 then
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then return
end
local cg=aux.GetAdjacentGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,row,column)
if Duel.GetLP(tp)<Duel.GetLP(1-tp) and #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT) Duel.Destroy(cg,REASON_EFFECT)
end end
......
...@@ -9,22 +9,9 @@ function c60759087.initial_effect(c) ...@@ -9,22 +9,9 @@ function c60759087.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,60759087+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,60759087+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60759087.condition) e1:SetCondition(c60759087.condition)
e1:SetTarget(c60759087.target1) e1:SetTarget(c60759087.target)
e1:SetOperation(c60759087.activate1) e1:SetOperation(c60759087.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60759087,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,60759087+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c60759087.condition)
e2:SetTarget(c60759087.target2)
e2:SetOperation(c60759087.activate2)
c:RegisterEffect(e2)
end end
function c60759087.cfilter(c,setcode) function c60759087.cfilter(c,setcode)
return c:IsSetCard(setcode) and c:IsFaceup() return c:IsSetCard(setcode) and c:IsFaceup()
...@@ -44,39 +31,46 @@ function c60759087.tgfilter1b(c) ...@@ -44,39 +31,46 @@ function c60759087.tgfilter1b(c)
return c:IsFaceup() and c:IsAbleToChangeControler() return c:IsFaceup() and c:IsAbleToChangeControler()
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end end
function c60759087.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c60759087.tgfilter1a,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c60759087.tgfilter1b,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectTarget(tp,c60759087.tgfilter1a,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,c60759087.tgfilter1b,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
end
function c60759087.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:GetFirst()
local b=g:GetNext()
if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
Duel.SwapControl(a,b)
end
end
function c60759087.tgfilter2(c) function c60759087.tgfilter2(c)
return c:IsFacedown() and c:IsAbleToDeck() return c:IsFacedown() and c:IsAbleToDeck()
end end
function c60759087.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60759087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c60759087.tgfilter1(chkc) and chkc:IsLocation(LOCATION_SZONE) if chkc then return e:GetLabel()==1 and c60759087.tgfilter1(chkc)
and chkc:IsControler(1-tp) end and chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c60759087.tgfilter2,tp,0,LOCATION_SZONE,1,nil) end local b1 = Duel.IsExistingTarget(c60759087.tgfilter1a,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) and Duel.IsExistingTarget(c60759087.tgfilter1b,tp,0,LOCATION_MZONE,1,nil)
local g=Duel.SelectTarget(tp,c60759087.tgfilter2,tp,0,LOCATION_SZONE,1,1,nil) local b2 = Duel.IsExistingTarget(c60759087.tgfilter2,tp,0,LOCATION_SZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(60759087,0),0},
{b2,aux.Stringid(60759087,1),1})
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectTarget(tp,c60759087.tgfilter1a,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,c60759087.tgfilter1b,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c60759087.tgfilter2,tp,0,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
end end
function c60759087.activate2(e,tp,eg,ep,ev,re,r,rp) function c60759087.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local op=e:GetLabel()
if tc:IsRelateToEffect(e) then if op==0 then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:GetFirst()
local b=g:GetNext()
if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
Duel.SwapControl(a,b)
end
else
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end end
end end
...@@ -85,6 +85,7 @@ end ...@@ -85,6 +85,7 @@ end
function c62892347.disop(e,tp,eg,ep,ev,re,r,rp) function c62892347.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler() local ec=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not ec:IsRelateToEffect(re) then return end
local val=ec:GetFlagEffectLabel(36690018) local val=ec:GetFlagEffectLabel(36690018)
if (val==1 and rp==1-ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end if (val==1 and rp==1-ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
......
--ティンクル・ファイブスター --ティンクル・ファイブスター
function c6309986.initial_effect(c) function c6309986.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,44632120,71036835,7021574,34419588,40640057)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--合成獣融合 --合成獣融合
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,4796100,5818798,77207191)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
......
...@@ -7,26 +7,18 @@ function c64373401.initial_effect(c) ...@@ -7,26 +7,18 @@ function c64373401.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c64373401.hspcon) e1:SetCondition(c64373401.hspcon)
e1:SetValue(SUMMON_VALUE_SELF) e1:SetOperation(c64373401.hspop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon limit --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetDescription(aux.Stringid(64373401,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c64373401.hspcon2) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetOperation(c64373401.hspop) e2:SetCondition(c64373401.spcon)
e2:SetTarget(c64373401.sptg)
e2:SetOperation(c64373401.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64373401,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c64373401.spcon)
e3:SetTarget(c64373401.sptg)
e3:SetOperation(c64373401.spop)
c:RegisterEffect(e3)
end end
function c64373401.filter(c) function c64373401.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -37,14 +29,11 @@ function c64373401.hspcon(e,c) ...@@ -37,14 +29,11 @@ function c64373401.hspcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c64373401.filter,tp,LOCATION_GRAVE,0,1,nil) and not Duel.IsExistingMatchingCard(c64373401.filter,tp,LOCATION_GRAVE,0,1,nil)
end end
function c64373401.hspcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c64373401.hspop(e,tp,eg,ep,ev,re,r,rp) function c64373401.hspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c64373401.splimit) e1:SetTarget(c64373401.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
--大革命 --大革命
function c65396880.initial_effect(c) function c65396880.initial_effect(c)
aux.AddCodeList(c,58538870,12143771,85936485)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
......
...@@ -40,7 +40,8 @@ function c66235877.distg(e,c) ...@@ -40,7 +40,8 @@ function c66235877.distg(e,c)
end end
function c66235877.disop(e,tp,eg,ep,ev,re,r,rp) function c66235877.disop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_FLIP) then Duel.NegateEffect(ev) end if re:IsActiveType(TYPE_FLIP) then Duel.NegateEffect(ev) end
if re:IsActiveType(TYPE_TRAP) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then if e:GetHandler():IsRelateToEffect(re)
and re:IsActiveType(TYPE_TRAP) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -39,7 +39,7 @@ function c68304193.initial_effect(c) ...@@ -39,7 +39,7 @@ function c68304193.initial_effect(c)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,68304194) e4:SetCountLimit(1,68304194)
e4:SetCondition(c68304193.rmcon) e4:SetCondition(c68304193.rmcon)
e4:SetTarget(c68304193.rmtg) e4:SetTarget(c68304193.rmtg2)
e4:SetOperation(c68304193.rmop) e4:SetOperation(c68304193.rmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -83,3 +83,7 @@ end ...@@ -83,3 +83,7 @@ end
function c68304193.rmcon(e,tp,eg,ep,ev,re,r,rp) function c68304193.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end end
function c68304193.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==1-tp and Duel.IsExistingMatchingCard(c68304193.rmfilter,tp,0,LOCATION_EXTRA,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
--ボンディング-DHO --ボンディング-DHO
function c6890729.initial_effect(c) function c6890729.initial_effect(c)
aux.AddCodeList(c,43017476,22587018,58071123,6022371,85066822)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--クリバビロン --クリバビロン
function c70914287.initial_effect(c) function c70914287.initial_effect(c)
aux.AddCodeList(c,40640057) aux.AddCodeList(c,44632120,71036835,7021574,34419588,40640057)
--special summon itself --special summon itself
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70914287,0)) e1:SetDescription(aux.Stringid(70914287,0))
......
--人形の幸福 --人形の幸福
function c71595845.initial_effect(c) function c71595845.initial_effect(c)
aux.AddCodeList(c,44190146,81587028,75574498)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
--王女の試練 --王女の試練
function c72709014.initial_effect(c) function c72709014.initial_effect(c)
aux.AddCodeList(c,81383947,46128076,75917088,2316186)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
......
...@@ -60,6 +60,7 @@ end ...@@ -60,6 +60,7 @@ end
function c73639099.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c73639099.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c73639099.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c73639099.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c73639099.spop(e,tp,eg,ep,ev,re,r,rp) function c73639099.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -80,6 +81,7 @@ function c73639099.setfilter(c) ...@@ -80,6 +81,7 @@ function c73639099.setfilter(c)
end end
function c73639099.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c73639099.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73639099.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c73639099.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c73639099.setop(e,tp,eg,ep,ev,re,r,rp) function c73639099.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
--神の進化 --神の進化
function c7373632.initial_effect(c) function c7373632.initial_effect(c)
aux.AddCodeList(c,21208154,62180201,57793869)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
......
--ラーの使徒 --ラーの使徒
function c74875003.initial_effect(c) function c74875003.initial_effect(c)
aux.AddCodeList(c,10000010) aux.AddCodeList(c,10000010,10000000,10000020)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74875003,0)) e1:SetDescription(aux.Stringid(74875003,0))
......
...@@ -39,10 +39,10 @@ function c76145142.indcon(e) ...@@ -39,10 +39,10 @@ function c76145142.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c76145142.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c76145142.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c76145142.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c76145142.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c76145142.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76145142.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
--ボンディング-D2O --ボンディング-D2O
function c79402185.initial_effect(c) function c79402185.initial_effect(c)
aux.AddCodeList(c,43017476,58071123,6022371,85066822)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--サイバーダーク・インパクト! --サイバーダーク・インパクト!
function c80033124.initial_effect(c) function c80033124.initial_effect(c)
aux.AddCodeList(c,41230939,77625948,3019642)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
......
...@@ -26,7 +26,7 @@ function c81674782.initial_effect(c) ...@@ -26,7 +26,7 @@ function c81674782.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c81674782.rmtarget(e,c) function c81674782.rmtarget(e,c)
return not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP) return c:GetOriginalType()&TYPE_MONSTER>0 and not c:IsLocation(0x80) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c81674782.checktg(e,c) function c81674782.checktg(e,c)
return not c:IsPublic() return not c:IsPublic()
......
--孤高の格闘家 --孤高の格闘家
function c82452993.initial_effect(c) function c82452993.initial_effect(c)
aux.AddCodeList(c,8508055,3810071,49814180)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
--おジャマ・デルタハリケーン!! --おジャマ・デルタハリケーン!!
function c8251996.initial_effect(c) function c8251996.initial_effect(c)
aux.AddCodeList(c,12482652,42941100,79335209)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
......
--古代の機械合成獣 --古代の機械合成獣
function c86321248.initial_effect(c) function c86321248.initial_effect(c)
aux.AddCodeList(c,41172955,86445415,13839120)
--mat check --mat check
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -34,10 +34,12 @@ function c87257460.initial_effect(c) ...@@ -34,10 +34,12 @@ function c87257460.initial_effect(c)
end end
c87257460.lvup={23756165} c87257460.lvup={23756165}
function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsSelfEquip(e:GetHandler(),id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) local c=e:GetHandler()
return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsSelfEquip(e:GetHandler(),id) and Duel.IsPlayerAffectedByEffect(tp,95937545) local c=e:GetHandler()
return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c87257460.filter(c) function c87257460.filter(c)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler()
...@@ -59,7 +61,7 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +61,7 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -80,7 +82,7 @@ function c87257460.repval(e,re,r,rp) ...@@ -80,7 +82,7 @@ function c87257460.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp) function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id) return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN)
end end
function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -20,10 +20,10 @@ function c94046012.initial_effect(c) ...@@ -20,10 +20,10 @@ function c94046012.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c94046012.spcon1(e,tp,eg,ep,ev,re,r,rp) function c94046012.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c94046012.spcon2(e,tp,eg,ep,ev,re,r,rp) function c94046012.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c94046012.spfilter(c,e,tp) function c94046012.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(94046012) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(94046012) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -39,7 +39,7 @@ function c94392192.initial_effect(c) ...@@ -39,7 +39,7 @@ function c94392192.initial_effect(c)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,94392193) e4:SetCountLimit(1,94392193)
e4:SetCondition(c94392192.rmcon) e4:SetCondition(c94392192.rmcon)
e4:SetTarget(c94392192.rmtg) e4:SetTarget(c94392192.rmtg2)
e4:SetOperation(c94392192.rmop) e4:SetOperation(c94392192.rmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -68,7 +68,7 @@ function c94392192.rmfilter(c,tp) ...@@ -68,7 +68,7 @@ function c94392192.rmfilter(c,tp)
end end
function c94392192.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c94392192.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(1-tp,1) local g=Duel.GetDecktopGroup(1-tp,1)
if chk==0 then return g and #g>0 and g:GetFirst():IsAbleToRemove(tp,POS_FACEDOWN) end if chk==0 then return #g>0 and g:GetFirst():IsAbleToRemove(tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK)
end end
function c94392192.rmop(e,tp,eg,ep,ev,re,r,rp) function c94392192.rmop(e,tp,eg,ep,ev,re,r,rp)
...@@ -96,3 +96,8 @@ end ...@@ -96,3 +96,8 @@ end
function c94392192.rmcon(e,tp,eg,ep,ev,re,r,rp) function c94392192.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end end
function c94392192.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(1-tp,1)
if chk==0 then return rp==1-tp and #g>0 and g:GetFirst():IsAbleToRemove(tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK)
end
...@@ -48,6 +48,7 @@ end ...@@ -48,6 +48,7 @@ end
function c94568601.disop(e,tp,eg,ep,ev,re,r,rp) function c94568601.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_TRAP) then return end if not re:IsActiveType(TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():IsRelateToEffect(re) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
......
--X・Y・Zコンバイン --X・Y・Zコンバイン
function c95471006.initial_effect(c) function c95471006.initial_effect(c)
aux.AddCodeList(c,62651957,65622692,64500000)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
......
--伝説の黒帯 --伝説の黒帯
function c96458440.initial_effect(c) function c96458440.initial_effect(c)
aux.AddCodeList(c,8508055,3810071,49814180)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
......
--ゴッドハンド・スマッシュ --ゴッドハンド・スマッシュ
function c97570038.initial_effect(c) function c97570038.initial_effect(c)
aux.AddCodeList(c,8508055,3810071,49814180)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -29,7 +29,7 @@ function c99157310.cfilter1(c) ...@@ -29,7 +29,7 @@ function c99157310.cfilter1(c)
end end
function c99157310.condition(e,tp,eg,ep,ev,re,r,rp) function c99157310.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetAttacker():IsControler(1-tp) return ep==tp and Duel.GetAttacker():IsControler(1-tp)
and Duel.IsExistingMatchingCard(c99157310.cfilter1,tp,LOCATION_GRAVE,0,3,nil) and Duel.GetMatchingGroup(c99157310.cfilter1,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)>=3
end end
function c99157310.filter(c,e,tp) function c99157310.filter(c,e,tp)
return c:IsCode(75119040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(75119040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......
...@@ -886,3 +886,4 @@ CARD_QUESTION =38723936 --谜题 ...@@ -886,3 +886,4 @@ CARD_QUESTION =38723936 --谜题
FLAG_ID_CHAINING =1 FLAG_ID_CHAINING =1
FLAG_ID_UNION =2 FLAG_ID_UNION =2
FLAG_ID_NO_NORMAL_DRAW =3 FLAG_ID_NO_NORMAL_DRAW =3
FLAG_ID_ALLURE_QUEEN =4
...@@ -864,12 +864,11 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc, ...@@ -864,12 +864,11 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc,
end end
--Fusion Summon --Fusion Summon
--material: names in material list
---Fusion monster, mixed materials (fixed count) ---Fusion monster, mixed materials (fixed count)
---@param fcard Card ---@param fcard Card
---@param sub boolean ---@param sub boolean Can be fusion summoned with substitute material
---@param insf boolean ---@param insf boolean Can be fusion summoned with no material (Instant Fusion)
---@param ... number|function|table ---@param ... number|function|table
function Auxiliary.AddFusionProcMix(fcard,sub,insf,...) function Auxiliary.AddFusionProcMix(fcard,sub,insf,...)
if fcard:IsStatus(STATUS_COPYING_EFFECT) then return end if fcard:IsStatus(STATUS_COPYING_EFFECT) then return end
...@@ -920,17 +919,17 @@ function Auxiliary.FConditionMix(insf,sub,...) ...@@ -920,17 +919,17 @@ function Auxiliary.FConditionMix(insf,sub,...)
--g:Material group(nil for Instant Fusion) --g:Material group(nil for Instant Fusion)
--gc:Material already used --gc:Material already used
--chkf: check field, default:PLAYER_NONE --chkf: check field, default:PLAYER_NONE
--chkf&0x100: Not fusion summon --chkf&0x100: Not fusion summon, can use substitute (Hex-Sealed Fusion)
--chkf&0x200: Concat fusion --chkf&0x200: Not fusion summon, can't use substitute ("Contact Fusion", Neos Fusion)
local funs={...} local funs={...}
return function(e,g,gc,chkfnf) return function(e,g,gc,chkfnf)
if g==nil then return insf and Auxiliary.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end if g==nil then return insf and Auxiliary.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
local notfusion=chkfnf&0x100>0 local hexsealed=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local notfusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or hexsealed) and not notfusion
local mg=g:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,table.unpack(funs)) local mg=g:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,notfusion,table.unpack(funs))
if gc then if gc then
if not mg:IsContains(gc) then return false end if not mg:IsContains(gc) then return false end
Duel.SetSelectedCard(gc) Duel.SetSelectedCard(gc)
...@@ -942,11 +941,11 @@ function Auxiliary.FOperationMix(insf,sub,...) ...@@ -942,11 +941,11 @@ function Auxiliary.FOperationMix(insf,sub,...)
local funs={...} local funs={...}
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler() local c=e:GetHandler()
local notfusion=chkfnf&0x100>0 local hexsealed=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local notfusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or hexsealed) and not notfusion
local cancel=concat_fusion and Duel.GetCurrentChain()==0 local cancel=notfusion and Duel.GetCurrentChain()==0
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,table.unpack(funs)) local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,notfusion,table.unpack(funs))
if gc then Duel.SetSelectedCard(gc) end if gc then Duel.SetSelectedCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,cancel,#funs,#funs,tp,c,sub2,chkfnf,table.unpack(funs)) local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,cancel,#funs,#funs,tp,c,sub2,chkfnf,table.unpack(funs))
...@@ -957,9 +956,9 @@ function Auxiliary.FOperationMix(insf,sub,...) ...@@ -957,9 +956,9 @@ function Auxiliary.FOperationMix(insf,sub,...)
end end
end end
end end
function Auxiliary.FConditionFilterMix(c,fc,sub,concat_fusion,...) function Auxiliary.FConditionFilterMix(c,fc,sub,notfusion,...)
local fusion_type=concat_fusion and SUMMON_TYPE_SPECIAL or SUMMON_TYPE_FUSION local check_type=notfusion and SUMMON_TYPE_SPECIAL or SUMMON_TYPE_FUSION
if not c:IsCanBeFusionMaterial(fc,fusion_type) then return false end if not c:IsCanBeFusionMaterial(fc,check_type) then return false end
for i,f in ipairs({...}) do for i,f in ipairs({...}) do
if f(c,fc,sub) then return true end if f(c,fc,sub) then return true end
end end
...@@ -983,8 +982,8 @@ end ...@@ -983,8 +982,8 @@ end
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc) --if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
function Auxiliary.FCheckMixGoal(sg,tp,fc,sub,chkfnf,...) function Auxiliary.FCheckMixGoal(sg,tp,fc,sub,chkfnf,...)
local chkf=chkfnf&0xff local chkf=chkfnf&0xff
local concat_fusion=chkfnf&0x200>0 local not_fusion=chkfnf&(0x100|0x200)>0
if not concat_fusion and sg:IsExists(Auxiliary.TuneMagicianCheckX,1,nil,sg,EFFECT_TUNE_MAGICIAN_F) then return false end if not not_fusion and sg:IsExists(Auxiliary.TuneMagicianCheckX,1,nil,sg,EFFECT_TUNE_MAGICIAN_F) then return false end
if not Auxiliary.MustMaterialCheck(sg,tp,EFFECT_MUST_BE_FMATERIAL) then return false end if not Auxiliary.MustMaterialCheck(sg,tp,EFFECT_MUST_BE_FMATERIAL) then return false end
local g=Group.CreateGroup() local g=Group.CreateGroup()
return sg:IsExists(Auxiliary.FCheckMix,1,nil,sg,g,fc,sub,...) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0) return sg:IsExists(Auxiliary.FCheckMix,1,nil,sg,g,fc,sub,...) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0)
...@@ -994,8 +993,8 @@ end ...@@ -994,8 +993,8 @@ end
---Fusion monster, mixed material * minc to maxc + material + ... ---Fusion monster, mixed material * minc to maxc + material + ...
---@param fcard Card ---@param fcard Card
---@param sub boolean ---@param sub boolean Can be fusion summoned with substitute material
---@param insf boolean ---@param insf boolean Can be fusion summoned with no material (Instant Fusion)
---@param fun1 number|function|table ---@param fun1 number|function|table
---@param minc integer ---@param minc integer
---@param maxc integer ---@param maxc integer
...@@ -1051,10 +1050,10 @@ function Auxiliary.FConditionMixRep(insf,sub,fun1,minc,maxc,...) ...@@ -1051,10 +1050,10 @@ function Auxiliary.FConditionMixRep(insf,sub,fun1,minc,maxc,...)
if g==nil then return insf and Auxiliary.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end if g==nil then return insf and Auxiliary.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
local notfusion=chkfnf&0x100>0 local hexsealed=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local notfusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or hexsealed) and not notfusion
local mg=g:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,fun1,table.unpack(funs)) local mg=g:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,notfusion,fun1,table.unpack(funs))
if gc then if gc then
if not mg:IsContains(gc) then return false end if not mg:IsContains(gc) then return false end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
...@@ -1069,11 +1068,11 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...) ...@@ -1069,11 +1068,11 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
local notfusion=chkfnf&0x100>0 local hexsealed=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local notfusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or hexsealed) and not notfusion
local cancel=concat_fusion and Duel.GetCurrentChain()==0 local cancel=notfusion and Duel.GetCurrentChain()==0
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,fun1,table.unpack(funs)) local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,notfusion,fun1,table.unpack(funs))
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end if gc then sg:AddCard(gc) end
while sg:GetCount()<maxc+#funs do while sg:GetCount()<maxc+#funs do
...@@ -1117,8 +1116,8 @@ function Auxiliary.FCheckMixRepFilter(c,sg,g,fc,sub,chkf,fun1,minc,maxc,fun2,... ...@@ -1117,8 +1116,8 @@ function Auxiliary.FCheckMixRepFilter(c,sg,g,fc,sub,chkf,fun1,minc,maxc,fun2,...
return false return false
end end
function Auxiliary.FCheckMixRepGoalCheck(tp,sg,fc,chkfnf) function Auxiliary.FCheckMixRepGoalCheck(tp,sg,fc,chkfnf)
local concat_fusion=chkfnf&0x200>0 local not_fusion=chkfnf&(0x100|0x200)>0
if not concat_fusion and sg:IsExists(Auxiliary.TuneMagicianCheckX,1,nil,sg,EFFECT_TUNE_MAGICIAN_F) then return false end if not not_fusion and sg:IsExists(Auxiliary.TuneMagicianCheckX,1,nil,sg,EFFECT_TUNE_MAGICIAN_F) then return false end
if not Auxiliary.MustMaterialCheck(sg,tp,EFFECT_MUST_BE_FMATERIAL) then return false end if not Auxiliary.MustMaterialCheck(sg,tp,EFFECT_MUST_BE_FMATERIAL) then return false end
if Auxiliary.FGoalCheckAdditional and not Auxiliary.FGoalCheckAdditional(tp,sg,fc) then return false end if Auxiliary.FGoalCheckAdditional and not Auxiliary.FGoalCheckAdditional(tp,sg,fc) then return false end
return true return true
......
...@@ -3,6 +3,7 @@ aux=Auxiliary ...@@ -3,6 +3,7 @@ aux=Auxiliary
POS_FACEUP_DEFENCE=POS_FACEUP_DEFENSE POS_FACEUP_DEFENCE=POS_FACEUP_DEFENSE
POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE
RACE_CYBERS=RACE_CYBERSE RACE_CYBERS=RACE_CYBERSE
NULL_VALUE=-10
function GetID() function GetID()
local offset=self_code<100000000 and 1 or 100 local offset=self_code<100000000 and 1 or 100
...@@ -548,38 +549,130 @@ end ...@@ -548,38 +549,130 @@ end
function Auxiliary.IsInGroup(c,g) function Auxiliary.IsInGroup(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
--return the column of card c (from the viewpoint of p) --Get the row index (from the viewpoint of controller)
function Auxiliary.GetColumn(c,p) function Auxiliary.GetLocalRow(location,sequence)
local seq=c:GetSequence() if location==LOCATION_SZONE then
if c:IsLocation(LOCATION_MZONE) then if 0<=sequence and sequence<=4 then
if seq==5 then return 0
seq=1 else
elseif seq==6 then return NULL_VALUE
seq=3
end end
elseif c:IsLocation(LOCATION_SZONE) then elseif location==LOCATION_MZONE then
if seq>4 then if 0<=sequence and sequence<=4 then
return nil return 1
elseif 5<=sequence and sequence<=6 then
return 2
else
return NULL_VALUE
end end
else else
return nil return NULL_VALUE
end
end
--Get the global row index (from the viewpoint of 0)
function Auxiliary.GetGlobalRow(p,location,sequence)
local row=Auxiliary.GetLocalRow(location,sequence)
if row<0 then
return NULL_VALUE
end
if p==0 then
return row
else
return 4-row
end
end
--Get the column index (from the viewpoint of controller)
function Auxiliary.GetLocalColumn(location,sequence)
if location==LOCATION_SZONE then
if 0<=sequence and sequence<=4 then
return sequence
else
return NULL_VALUE
end
elseif location==LOCATION_MZONE then
if 0<=sequence and sequence<=4 then
return sequence
elseif sequence==5 then
return 1
elseif sequence==6 then
return 3
else
return NULL_VALUE
end
else
return NULL_VALUE
end
end
--Get the global column index (from the viewpoint of 0)
function Auxiliary.GetGlobalColumn(p,location,sequence)
local column=Auxiliary.GetLocalColumn(location,sequence)
if column<0 then
return NULL_VALUE
end
if p==0 then
return column
else
return 4-column
end
end
---Get the global row and column index of c
---@param c Card
---@return integer
---@return integer
function Auxiliary.GetFieldIndex(c)
local cp=c:GetControler()
local loc=c:GetLocation()
local seq=c:GetSequence()
return Auxiliary.GetGlobalRow(cp,loc,seq),Auxiliary.GetGlobalColumn(cp,loc,seq)
end
---Check if c is adjacent to (i,j)
---@param c Card
---@param i integer
---@param j integer
---@return boolean
function Auxiliary.AdjacentFilter(c,i,j)
local row,column=Auxiliary.GetFieldIndex(c)
if row<0 or column<0 then
return false
end end
if c:IsControler(p or 0) then return (row==i and math.abs(column-j)==1) or (math.abs(row-i)==1 and column==j)
return seq end
---Get the card group adjacent to (i,j)
---@param tp integer
---@param location1 integer
---@param location2 integer
---@param i integer
---@param j integer
---@return Group
function Auxiliary.GetAdjacentGroup(tp,location1,location2,i,j)
return Duel.GetMatchingGroup(Auxiliary.AdjacentFilter,tp,location1,location2,nil,i,j)
end
---Get the column index of card c (from the viewpoint of p)
---@param c Card
---@param p? integer default: 0
---@return integer
function Auxiliary.GetColumn(c,p)
p=p or 0
local cp=c:GetControler()
local loc=c:GetLocation()
local seq=c:GetSequence()
local column=Auxiliary.GetGlobalColumn(cp,loc,seq)
if column<0 then
return NULL_VALUE
end
if p==0 then
return column
else else
return 4-seq return 4-column
end end
end end
--return the column of monster zone seq (from the viewpoint of controller) --return the column of monster zone seq (from the viewpoint of controller)
function Auxiliary.MZoneSequence(seq) function Auxiliary.MZoneSequence(seq)
if seq==5 then return 1 end return Auxiliary.GetLocalColumn(LOCATION_MZONE,seq)
if seq==6 then return 3 end
return seq
end end
--return the column of spell/trap zone seq (from the viewpoint of controller) --return the column of spell/trap zone seq (from the viewpoint of controller)
function Auxiliary.SZoneSequence(seq) function Auxiliary.SZoneSequence(seq)
if seq>4 then return nil end return Auxiliary.GetLocalColumn(LOCATION_SZONE,seq)
return seq
end end
--generate the value function of EFFECT_CHANGE_BATTLE_DAMAGE on monsters --generate the value function of EFFECT_CHANGE_BATTLE_DAMAGE on monsters
function Auxiliary.ChangeBattleDamage(player,value) function Auxiliary.ChangeBattleDamage(player,value)
...@@ -1646,3 +1739,29 @@ end ...@@ -1646,3 +1739,29 @@ end
function Auxiliary.IsSelfEquip(c,id) function Auxiliary.IsSelfEquip(c,id)
return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id) return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id)
end end
---Orcustrated Babel
---@param c Card
---@return boolean
function Auxiliary.OrcustratedBabelFilter(c)
return c:IsOriginalSetCard(0x11b) and
(c:IsLocation(LOCATION_MZONE) and c:IsAllTypes(TYPE_LINK+TYPE_MONSTER) or c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER))
end
---Golden Allure Queen
---@param c Card
---@return boolean
function Auxiliary.GoldenAllureQueenFilter(c)
return c:IsOriginalSetCard(0x3)
end
--The table of all "become quick effects"
Auxiliary.quick_effect_filter={}
Auxiliary.quick_effect_filter[90351981]=Auxiliary.OrcustratedBabelFilter
Auxiliary.quick_effect_filter[95937545]=Auxiliary.GoldenAllureQueenFilter
---Check if the effect of c becomes a Quick Effect.
---@param c Card
---@param tp integer
---@param code integer
---@return boolean
function Auxiliary.IsCanBeQuickEffect(c,tp,code)
local filter=Auxiliary.quick_effect_filter[code]
return Duel.IsPlayerAffectedByEffect(tp,code)~=nil and filter~=nil and filter(c)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment