Commit 4122582c authored by DailyShana's avatar DailyShana

fix

parent b1afe4c9
--クロノグラフ・マジシャン --クロノグラフ・マジシャン
function c12289247.initial_effect(c) function c12289247.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--Replace --pendulum set/spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12289247,0)) e1:SetDescription(aux.Stringid(12289247,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,12289247) e1:SetCountLimit(1,12289247)
...@@ -26,9 +26,9 @@ function c12289247.initial_effect(c) ...@@ -26,9 +26,9 @@ function c12289247.initial_effect(c)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12289247,5)) e3:SetDescription(aux.Stringid(12289247,5))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetCost(c12289247.hncost) e3:SetCost(c12289247.hncost)
e3:SetTarget(c12289247.hntg) e3:SetTarget(c12289247.hntg)
e3:SetOperation(c12289247.hnop) e3:SetOperation(c12289247.hnop)
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c12289247.rpop(e,tp,eg,ep,ev,re,r,rp) function c12289247.rpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(12289247,6))
local g=Duel.SelectMatchingCard(tp,c12289247.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c12289247.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local op=0 local op=0
...@@ -65,7 +65,7 @@ function c12289247.spcfilter(c,tp) ...@@ -65,7 +65,7 @@ function c12289247.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp
end end
function c12289247.spcon(e,tp,eg,ep,ev,re,r,rp) function c12289247.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c12289247.spcfilter,1,nil,tp) return eg:IsExists(c12289247.spcfilter,1,nil,tp)
end end
function c12289247.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c12289247.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -89,43 +89,69 @@ function c12289247.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,43 +89,69 @@ function c12289247.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c12289247.hncfilter(c,sc) function c12289247.cfilter(c)
return c:IsSetCard(sc) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return (c:IsSetCard(0x10f2) or c:IsSetCard(0x2073) or c:IsSetCard(0x2017) or c:IsSetCard(0x1046))
and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c12289247.cfilter1(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x10f2) and mg:IsExists(c12289247.cfilter2,1,nil,mg,ft)
end
function c12289247.cfilter2(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x2073) and mg:IsExists(c12289247.cfilter3,1,nil,mg,ft)
end
function c12289247.cfilter3(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x2017) and mg:IsExists(c12289247.cfilter4,1,nil,ft)
end
function c12289247.cfilter4(c,ft)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x1046) and ft>0
end end
function c12289247.hncost(e,tp,eg,ep,ev,re,r,rp,chk) function c12289247.hncost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local loc=LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE local mg=Duel.GetMatchingGroup(c12289247.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return c:IsAbleToRemoveAsCost() if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c12289247.hncfilter,tp,loc,0,1,nil,0x10f2) and mg:IsExists(c12289247.cfilter1,1,nil,mg,ft+1) end
and Duel.IsExistingMatchingCard(c12289247.hncfilter,tp,loc,0,1,nil,0x2073)
and Duel.IsExistingMatchingCard(c12289247.hncfilter,tp,loc,0,1,nil,0x2017)
and Duel.IsExistingMatchingCard(c12289247.hncfilter,tp,loc,0,1,nil,0x1046)
end
local g=Group.FromCards(c) local g=Group.FromCards(c)
ft=ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c12289247.hncfilter,tp,loc,0,1,1,nil,0x10f2) local rc1=mg:FilterSelect(tp,c12289247.cfilter1,1,1,nil,mg,ft):GetFirst()
g:Merge(g1) g:AddCard(rc1)
mg:RemoveCard(rc1)
if rc1:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c12289247.hncfilter,tp,loc,0,1,1,nil,0x2073) local rc2=mg:FilterSelect(tp,c12289247.cfilter2,1,1,nil,mg,ft):GetFirst()
g:Merge(g2) g:AddCard(rc2)
mg:RemoveCard(rc2)
if rc2:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=Duel.SelectMatchingCard(tp,c12289247.hncfilter,tp,loc,0,1,1,nil,0x2017) local rc3=mg:FilterSelect(tp,c12289247.cfilter3,1,1,nil,mg,ft):GetFirst()
g:Merge(g3) g:AddCard(rc3)
mg:RemoveCard(rc3)
if rc3:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g4=Duel.SelectMatchingCard(tp,c12289247.hncfilter,tp,loc,0,1,1,nil,0x1046) local rc4=mg:FilterSelect(tp,c12289247.cfilter4,1,1,nil,ft):GetFirst()
g:Merge(g4) g:AddCard(rc4)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c12289247.hnfilter(c,e,tp) function c12289247.hnfilter(c,e,tp)
return c:IsFacedown() and c:IsCode(100912039) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsCode(100912039) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end end
function c12289247.hntg(e,tp,eg,ep,ev,re,r,rp,chk) function c12289247.hntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.IsExistingMatchingCard(c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c12289247.hnop(e,tp,eg,ep,ev,re,r,rp) function c12289247.hnop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c12289247.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -12,6 +12,7 @@ function c1344018.initial_effect(c) ...@@ -12,6 +12,7 @@ function c1344018.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e2:SetValue(c1344018.evalue) e2:SetValue(c1344018.evalue)
...@@ -61,11 +62,11 @@ end ...@@ -61,11 +62,11 @@ end
function c1344018.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1344018.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c1344018.desfilter,tp,LOCATION_ONFIELD,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c1344018.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c1344018.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectTarget(tp,c1344018.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end end
...@@ -73,7 +74,7 @@ function c1344018.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +74,7 @@ function c1344018.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Destroy(g,REASON_EFFECT)~=2 then if Duel.Destroy(g,REASON_EFFECT)~=2 then
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g2=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1344018,1)) then if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1344018,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -34,8 +34,7 @@ function c47349116.matfilter(c) ...@@ -34,8 +34,7 @@ function c47349116.matfilter(c)
return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)
end end
function c47349116.splimit(e,se,sp,st) function c47349116.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se)
and (not se or se:GetHandler():IsCode(73860462)))
end end
function c47349116.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c47349116.thcost(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
...@@ -46,9 +45,8 @@ function c47349116.thfilter(c) ...@@ -46,9 +45,8 @@ function c47349116.thfilter(c)
and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand()
end end
function c47349116.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c47349116.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c47349116.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,nil) if chk==0 then return Duel.IsExistingMatchingCard(c47349116.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
if chk==0 then return g:GetCount()>0 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c47349116.thop(e,tp,eg,ep,ev,re,r,rp) function c47349116.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -68,16 +66,15 @@ function c47349116.repfilter(c,tp) ...@@ -68,16 +66,15 @@ function c47349116.repfilter(c,tp)
and (c:IsLocation(LOCATION_MZONE) or (c:IsLocation(LOCATION_SZONE) and (seq==6 or seq==7))) and (c:IsLocation(LOCATION_MZONE) or (c:IsLocation(LOCATION_SZONE) and (seq==6 or seq==7)))
and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c47349116.repcfilter(c) function c47349116.tgfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGrave() return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGrave()
end end
function c47349116.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47349116.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=eg:FilterCount(c47349116.repfilter,nil,tp) if chk==0 then return eg:IsExists(c47349116.repfilter,1,nil,tp)
local g=Duel.GetMatchingGroup(c47349116.repcfilter,tp,LOCATION_DECK,0,nil) and Duel.IsExistingMatchingCard(c47349116.tgfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return ct>0 and g:GetCount()>0 end
if Duel.SelectYesNo(tp,aux.Stringid(47349116,1)) then if Duel.SelectYesNo(tp,aux.Stringid(47349116,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c47349116.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
return true return true
else return false end else return false end
......
...@@ -5,9 +5,9 @@ function c48461764.initial_effect(c) ...@@ -5,9 +5,9 @@ function c48461764.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48461764,0)) e1:SetDescription(aux.Stringid(48461764,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c48461764.atkcon) e1:SetCondition(c48461764.atkcon)
e1:SetTarget(c48461764.atktg) e1:SetTarget(c48461764.atktg)
...@@ -27,12 +27,10 @@ function c48461764.initial_effect(c) ...@@ -27,12 +27,10 @@ function c48461764.initial_effect(c)
end end
function c48461764.atkcon(e,tp,eg,ep,ev,re,r,rp) function c48461764.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a:IsControler(tp) then if not a:IsControler(tp) then
if not d then return false end a=Duel.GetAttackTarget()
a=d
end end
return a:IsControler(tp) and a:IsAttribute(ATTRIBUTE_DARK) and a:IsRace(RACE_SPELLCASTER) return a and a:IsAttribute(ATTRIBUTE_DARK) and a:IsRace(RACE_SPELLCASTER)
end end
function c48461764.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c48461764.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -43,14 +41,16 @@ function c48461764.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,14 +41,16 @@ function c48461764.atkop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
local e1=Effect.CreateEffect(c) if tc:IsRelateToBattle() then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1200) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetValue(1200)
tc:RegisterEffect(e1) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.BreakEffect() tc:RegisterEffect(e1)
Duel.Destroy(c,REASON_EFFECT) Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
end
end end
function c48461764.descon(e,tp,eg,ep,ev,re,r,rp) function c48461764.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
......
...@@ -10,6 +10,7 @@ function c74850403.initial_effect(c) ...@@ -10,6 +10,7 @@ function c74850403.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e2:SetValue(c74850403.evalue) e2:SetValue(c74850403.evalue)
...@@ -19,7 +20,6 @@ function c74850403.initial_effect(c) ...@@ -19,7 +20,6 @@ function c74850403.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,74850403) e3:SetCountLimit(1,74850403)
e3:SetCondition(c74850403.thcon) e3:SetCondition(c74850403.thcon)
...@@ -38,7 +38,7 @@ function c74850403.thcfilter(c,tp) ...@@ -38,7 +38,7 @@ function c74850403.thcfilter(c,tp)
and (pl==LOCATION_MZONE or (pl==LOCATION_SZONE and (ps==6 or ps==7))) and (pl==LOCATION_MZONE or (pl==LOCATION_SZONE and (ps==6 or ps==7)))
end end
function c74850403.thcon(e,tp,eg,ep,ev,re,r,rp) function c74850403.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c74850403.thcfilter,1,nil,tp) return eg:IsExists(c74850403.thcfilter,1,nil,tp)
end end
function c74850403.thfilter(c) function c74850403.thfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x98) and c:IsAbleToHand() return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x98) and c:IsAbleToHand()
......
...@@ -60,7 +60,6 @@ function c75672051.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -60,7 +60,6 @@ function c75672051.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c75672051.spop(e,tp,eg,ep,ev,re,r,rp) function c75672051.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
--アストログラフ・マジシャン --アストログラフ・マジシャン
function c76794549.initial_effect(c) function c76794549.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--Replace --pendulum set/spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76794549,0)) e1:SetDescription(aux.Stringid(76794549,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,76794549) e1:SetCountLimit(1,76794549)
...@@ -26,9 +26,9 @@ function c76794549.initial_effect(c) ...@@ -26,9 +26,9 @@ function c76794549.initial_effect(c)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(76794549,5)) e3:SetDescription(aux.Stringid(76794549,5))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetCost(c76794549.hncost) e3:SetCost(c76794549.hncost)
e3:SetTarget(c76794549.hntg) e3:SetTarget(c76794549.hntg)
e3:SetOperation(c76794549.hnop) e3:SetOperation(c76794549.hnop)
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c76794549.rpop(e,tp,eg,ep,ev,re,r,rp) function c76794549.rpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(76794549,6))
local g=Duel.SelectMatchingCard(tp,c76794549.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c76794549.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local op=0 local op=0
...@@ -66,7 +66,7 @@ function c76794549.spcfilter(c,tp) ...@@ -66,7 +66,7 @@ function c76794549.spcfilter(c,tp)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c76794549.spcon(e,tp,eg,ep,ev,re,r,rp) function c76794549.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c76794549.spcfilter,1,nil,tp) return eg:IsExists(c76794549.spcfilter,1,nil,tp)
end end
function c76794549.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c76794549.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -74,7 +74,7 @@ function c76794549.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,7 +74,7 @@ function c76794549.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c76794549.thfilter1(c,tp) function c76794549.thfilter1(c,tp,id)
return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_DESTROY) and c:GetTurnID()==id return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_DESTROY) and c:GetTurnID()==id
and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and Duel.IsExistingMatchingCard(c76794549.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(c76794549.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
...@@ -86,14 +86,14 @@ function c76794549.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,14 +86,14 @@ function c76794549.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(c76794549.thfilter1,tp,0x70,0x70,nil,tp) local g=Duel.GetMatchingGroup(c76794549.thfilter1,tp,0x70,0x70,nil,tp,Duel.GetTurnCount())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(76794549,4)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(76794549,4)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(76794549,7))
local cg=g:Select(tp,1,1,nil) local cg=g:Select(tp,1,1,nil)
Duel.HintSelection(cg) Duel.HintSelection(cg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c76794549.thfilter2,tp,LOCATION_DECK,0,1,1,nil,cg:GetFirst()) local sg=Duel.SelectMatchingCard(tp,c76794549.thfilter2,tp,LOCATION_DECK,0,1,1,nil,cg:GetFirst():GetCode())
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
...@@ -101,43 +101,69 @@ function c76794549.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,43 +101,69 @@ function c76794549.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
end end
function c76794549.hncfilter(c,sc) function c76794549.cfilter(c)
return c:IsSetCard(sc) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return (c:IsSetCard(0x10f2) or c:IsSetCard(0x2073) or c:IsSetCard(0x2017) or c:IsSetCard(0x1046))
and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c76794549.cfilter1(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x10f2) and mg:IsExists(c76794549.cfilter2,1,nil,mg,ft)
end
function c76794549.cfilter2(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x2073) and mg:IsExists(c76794549.cfilter3,1,nil,mg,ft)
end
function c76794549.cfilter3(c,g,ft)
local mg=g:Clone()
mg:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x2017) and mg:IsExists(c76794549.cfilter4,1,nil,ft)
end
function c76794549.cfilter4(c,ft)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return c:IsSetCard(0x1046) and ft>0
end end
function c76794549.hncost(e,tp,eg,ep,ev,re,r,rp,chk) function c76794549.hncost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local loc=LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE local mg=Duel.GetMatchingGroup(c76794549.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return c:IsAbleToRemoveAsCost() if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c76794549.hncfilter,tp,loc,0,1,nil,0x10f2) and mg:IsExists(c76794549.cfilter1,1,nil,mg,ft+1) end
and Duel.IsExistingMatchingCard(c76794549.hncfilter,tp,loc,0,1,nil,0x2073)
and Duel.IsExistingMatchingCard(c76794549.hncfilter,tp,loc,0,1,nil,0x2017)
and Duel.IsExistingMatchingCard(c76794549.hncfilter,tp,loc,0,1,nil,0x1046)
end
local g=Group.FromCards(c) local g=Group.FromCards(c)
ft=ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c76794549.hncfilter,tp,loc,0,1,1,nil,0x10f2) local rc1=mg:FilterSelect(tp,c76794549.cfilter1,1,1,nil,mg,ft):GetFirst()
g:Merge(g1) g:AddCard(rc1)
mg:RemoveCard(rc1)
if rc1:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c76794549.hncfilter,tp,loc,0,1,1,nil,0x2073) local rc2=mg:FilterSelect(tp,c76794549.cfilter2,1,1,nil,mg,ft):GetFirst()
g:Merge(g2) g:AddCard(rc2)
mg:RemoveCard(rc2)
if rc2:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=Duel.SelectMatchingCard(tp,c76794549.hncfilter,tp,loc,0,1,1,nil,0x2017) local rc3=mg:FilterSelect(tp,c76794549.cfilter3,1,1,nil,mg,ft):GetFirst()
g:Merge(g3) g:AddCard(rc3)
mg:RemoveCard(rc3)
if rc3:IsLocation(LOCATION_MZONE) then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g4=Duel.SelectMatchingCard(tp,c76794549.hncfilter,tp,loc,0,1,1,nil,0x1046) local rc4=mg:FilterSelect(tp,c76794549.cfilter4,1,1,nil,ft):GetFirst()
g:Merge(g4) g:AddCard(rc4)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c76794549.hnfilter(c,e,tp) function c76794549.hnfilter(c,e,tp)
return c:IsFacedown() and c:IsCode(100912039) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsCode(100912039) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end end
function c76794549.hntg(e,tp,eg,ep,ev,re,r,rp,chk) function c76794549.hntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.IsExistingMatchingCard(c76794549.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c76794549.hnfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c76794549.hnop(e,tp,eg,ep,ev,re,r,rp) function c76794549.hnop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c76794549.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c76794549.hnfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
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