Commit fe299dd0 authored by mercury233's avatar mercury233

fix

parent 4b4160c5
...@@ -24,7 +24,6 @@ function c101102092.initial_effect(c) ...@@ -24,7 +24,6 @@ function c101102092.initial_effect(c)
e3:SetDescription(aux.Stringid(101102092,1)) e3:SetDescription(aux.Stringid(101102092,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(c101102092.drtg) e3:SetTarget(c101102092.drtg)
...@@ -52,20 +51,18 @@ function c101102092.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,20 +51,18 @@ function c101102092.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101102092.drtgfilter(c) function c101102092.drtgfilter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x258) return c:IsAbleToDeck() and c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER)
end end
function c101102092.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102092.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c101102092.drtgfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c101102092.drtgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c101102092.drop(e,tp,eg,ep,ev,re,r,rp) function c101102092.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101102092.drtgfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101102092.drtgfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then local tc=g:GetFirst()
Duel.SendtoDeck(g,nil,1,REASON_EFFECT) if tc and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
...@@ -47,11 +47,11 @@ function c101103006.ovfilter(c) ...@@ -47,11 +47,11 @@ function c101103006.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end end
function c101103006.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103006.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103006.ovfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103006.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c101103006.ovfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101103006.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103006.ovfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101103006.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
......
...@@ -49,11 +49,11 @@ function c101103007.ovfilter(c) ...@@ -49,11 +49,11 @@ function c101103007.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end end
function c101103007.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103007.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103007.ovfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103007.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c101103007.ovfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101103007.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103007.ovfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101103007.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
......
...@@ -28,11 +28,11 @@ function c101103008.ovfilter(c) ...@@ -28,11 +28,11 @@ function c101103008.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end end
function c101103008.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103008.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103008.ovfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103008.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c101103008.ovfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101103008.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103008.ovfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101103008.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
......
...@@ -42,11 +42,11 @@ function c101103009.ovfilter(c) ...@@ -42,11 +42,11 @@ function c101103009.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x257) and c:IsType(TYPE_XYZ)
end end
function c101103009.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103009.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103009.ovfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103009.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c101103009.ovfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101103009.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101103009.ovfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101103009.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
......
...@@ -12,7 +12,7 @@ function c101103023.initial_effect(c) ...@@ -12,7 +12,7 @@ function c101103023.initial_effect(c)
--スペシャル召喚と両方のモンスターは、そのレベルを増加させます --スペシャル召喚と両方のモンスターは、そのレベルを増加させます
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103023,0)) e1:SetDescription(aux.Stringid(101103023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LVCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
...@@ -26,6 +26,8 @@ function c101103023.initial_effect(c) ...@@ -26,6 +26,8 @@ function c101103023.initial_effect(c)
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101103023.poscon)
e2:SetTarget(c101103023.postg) e2:SetTarget(c101103023.postg)
e2:SetOperation(c101103023.posop) e2:SetOperation(c101103023.posop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -46,24 +48,27 @@ end ...@@ -46,24 +48,27 @@ end
--スペシャル召喚 --スペシャル召喚
function c101103023.spcon(e,tp,eg,ep,ev,re,r,rp) function c101103023.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst() local ec=eg:GetFirst()
return ep==tp and ec:GetLevel()==3 and ec:IsRace(RACE_INSECT) return ep==tp and ec:IsLevel(3) and ec:IsRace(RACE_INSECT)
end end
function c101103023.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103023.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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101103023.spop(e,tp,eg,ep,ev,re,r,rp) function c101103023.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
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,true,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(101103023,2)) then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(101103023,2)) then
local g=Group.FromCards(c,tc):Filter(Card.IsFaceup,nil,nil) local g=Group.FromCards(c)
local lv=Duel.AnnounceLevel(tp,5,7,6) if tc:IsRelateToEffect(e) then g:AddCard(tc) end
g=g:Filter(Card.IsFaceup,nil)
local lv=Duel.AnnounceNumber(tp,5,7)
for oc in aux.Next(g) do for oc in aux.Next(g) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv) e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
oc:RegisterEffect(e1) oc:RegisterEffect(e1)
...@@ -71,19 +76,23 @@ function c101103023.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,19 +76,23 @@ function c101103023.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--戦闘位置の変更 --戦闘位置の変更
function c101103023.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c101103023.posfilter(c) function c101103023.posfilter(c)
return c:IsRace(RACE_INSECT) and c:IsFaceup() return c:IsRace(RACE_INSECT) and c:IsFaceup() and c:IsCanChangePosition()
end end
function c101103023.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103023.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103023.spfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101103023.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
end end
function c101103023.posop(e,tp,eg,ep,ev,re,r,rp) function c101103023.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c101103023.posfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101103023.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) Duel.HintSelection(g)
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
--ゲイン効果 --ゲイン効果
...@@ -93,15 +102,15 @@ end ...@@ -93,15 +102,15 @@ end
function c101103023.efop(e,tp,eg,ep,ev,re,r,rp) function c101103023.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=c:GetReasonCard() local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1) rc:RegisterEffect(e1,true)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
rc:RegisterEffect(e2) rc:RegisterEffect(e2,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
...@@ -110,4 +119,5 @@ function c101103023.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,4 +119,5 @@ function c101103023.efop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true) rc:RegisterEffect(e3,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101103023,3))
end end
...@@ -16,6 +16,7 @@ function c101103026.initial_effect(c) ...@@ -16,6 +16,7 @@ function c101103026.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103026,3))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_TODECK) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -42,6 +43,7 @@ function c101103026.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +43,7 @@ function c101103026.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and not c:IsAttribute(ATTRIBUTE_DARK) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and not c:IsAttribute(ATTRIBUTE_DARK)
and Duel.SelectYesNo(tp,aux.Stringid(101103026,1)) then and Duel.SelectYesNo(tp,aux.Stringid(101103026,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
...@@ -52,7 +54,7 @@ function c101103026.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +54,7 @@ function c101103026.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101103026.thcon(e,tp,eg,ep,ev,re,r,rp) function c101103026.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER)
end end
function c101103026.thfilter(c) function c101103026.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
...@@ -70,6 +72,7 @@ function c101103026.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,6 +72,7 @@ function c101103026.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c101103026.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101103026.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
...@@ -79,7 +82,7 @@ function c101103026.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +82,7 @@ function c101103026.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoDeck(g,nil,1,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
end end
...@@ -10,7 +10,7 @@ function c101103029.initial_effect(c) ...@@ -10,7 +10,7 @@ function c101103029.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103129) e1:SetCountLimit(1,101103029)
e1:SetCondition(c101103029.spcon) e1:SetCondition(c101103029.spcon)
e1:SetTarget(c101103029.sptg) e1:SetTarget(c101103029.sptg)
e1:SetOperation(c101103029.spop) e1:SetOperation(c101103029.spop)
...@@ -21,14 +21,14 @@ function c101103029.initial_effect(c) ...@@ -21,14 +21,14 @@ function c101103029.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101103029) e2:SetCountLimit(1,101103129)
e2:SetCondition(c101103029.actcon) e2:SetCondition(c101103029.actcon)
e2:SetTarget(c101103029.acttg) e2:SetTarget(c101103029.acttg)
e2:SetOperation(c101103029.actop) e2:SetOperation(c101103029.actop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101103029.cfilter(c,tp) function c101103029.cfilter(c,tp)
return bit.band(c:GetSummonLocation(),LOCATION_EXTRA)==LOCATION_EXTRA and c:GetSummonPlayer()==1-tp and c:GetAttack()>2000 return bit.band(c:GetSummonLocation(),LOCATION_EXTRA)==LOCATION_EXTRA and c:GetSummonPlayer()==1-tp and c:IsAttackAbove(2000) and c:IsFaceup()
end end
function c101103029.spcon(e,tp,eg,ep,ev,re,r,rp) function c101103029.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103029.cfilter,1,nil,tp) return eg:IsExists(c101103029.cfilter,1,nil,tp)
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function c101103029.actop(e,tp,eg,ep,ev,re,r,rp) function c101103029.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and tc:IsFaceup()
and not tc:IsImmuneToEffect(e) then and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -73,4 +73,4 @@ function c101103029.ctcon(e) ...@@ -73,4 +73,4 @@ function c101103029.ctcon(e)
local c=e:GetOwner() local c=e:GetOwner()
local h=e:GetHandler() local h=e:GetHandler()
return c:IsHasCardTarget(h) return c:IsHasCardTarget(h)
end end
\ No newline at end of file
...@@ -24,7 +24,7 @@ function c101103031.initial_effect(c) ...@@ -24,7 +24,7 @@ function c101103031.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101103031.tgcon(e,tp,eg,ep,ev,re,r,rp) function c101103031.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
function c101103031.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101103031.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
...@@ -38,22 +38,26 @@ function c101103031.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,22 +38,26 @@ function c101103031.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c101103031.tgop(e,tp,eg,ep,ev,re,r,rp,chk) function c101103031.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c101103031.filter,tp,LOCATION_DECK,0,nil)
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103031.filter,tp,LOCATION_DECK,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,c101103031.filter,tp,LOCATION_DECK,0,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c101103031.atttg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103031.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return not e:GetHandler():IsAttribute(ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
function c101103031.attop(e,tp,eg,ep,ev,re,r,rp) function c101103031.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) if c:IsRelateToEffect(e) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(ATTRIBUTE_DARK) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end c:RegisterEffect(e1)
\ No newline at end of file end
end
...@@ -11,7 +11,7 @@ function c101103032.initial_effect(c) ...@@ -11,7 +11,7 @@ function c101103032.initial_effect(c)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
e1:SetCondition(c101103032.rmcon) e1:SetCondition(c101103032.rmcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy --position
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103032,0)) e2:SetDescription(aux.Stringid(101103032,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
...@@ -28,16 +28,16 @@ function c101103032.initial_effect(c) ...@@ -28,16 +28,16 @@ function c101103032.initial_effect(c)
e3:SetCategory(CATEGORY_POSITION) e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetOperation(c101103032.posop) e3:SetTarget(c101103032.postg2)
e3:SetOperation(c101103032.posop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103032,2)) e4:SetDescription(aux.Stringid(101103032,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_CHANGE_POS) e4:SetCode(EVENT_CHANGE_POS)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101103032) e4:SetCountLimit(1,101103032)
...@@ -46,9 +46,10 @@ function c101103032.initial_effect(c) ...@@ -46,9 +46,10 @@ function c101103032.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--tohand --tohand
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101103032,3))
e5:SetCategory(CATEGORY_TOHAND) e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED) e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,101103032+100) e5:SetCountLimit(1,101103032+100)
e5:SetCondition(c101103032.thcon) e5:SetCondition(c101103032.thcon)
...@@ -77,15 +78,19 @@ function c101103032.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -77,15 +78,19 @@ function c101103032.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c101103032.posop(e,tp,eg,ep,ev,re,r,rp) function c101103032.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsCanChangePosition,nil,e) local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.ChangePosition(tg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(tg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
function c101103032.posop(e,tp,eg,ep,ev,re,r,rp) function c101103032.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanChangePosition() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c101103032.posop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
function c101103032.desfilter(c) function c101103032.desfilter(c)
...@@ -116,6 +121,7 @@ function c101103032.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,6 +121,7 @@ function c101103032.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -27,14 +27,14 @@ end ...@@ -27,14 +27,14 @@ end
function c101103033.actlimit(e,re,tp) function c101103033.actlimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
local c=e:GetHandler() local c=e:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsAttribute(c:GetAttribute()) and rc~=c and rc:GetControler()==c:GetControler() return re:IsActiveType(TYPE_MONSTER) and rc:IsAttribute(c:GetAttribute()) and rc~=c and tp==c:GetControler()
end end
function c101103033.ctcon(e,tp,eg,ep,ev,re,r,rp) function c101103033.ctcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner() local p=e:GetHandler():GetOwner()
return p==Duel.GetTurnPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return p==Duel.GetTurnPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c101103033.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103033.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end if chk==0 then return e:GetHandler():IsControlerCanBeChanged() end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end end
function c101103033.ctop(e,tp,eg,ep,ev,re,r,rp) function c101103033.ctop(e,tp,eg,ep,ev,re,r,rp)
...@@ -50,4 +50,4 @@ function c101103033.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,4 +50,4 @@ function c101103033.ctop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -89,8 +89,9 @@ function c101103034.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,8 +89,9 @@ function c101103034.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*100) e1:SetValue(ct*100)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -20,8 +20,8 @@ function c101103037.initial_effect(c) ...@@ -20,8 +20,8 @@ function c101103037.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101103137)
e2:SetCost(c101103037.cost) e2:SetCost(c101103037.cost)
e2:SetCountLimit(1,101103037)
e2:SetTarget(c101103037.target) e2:SetTarget(c101103037.target)
e2:SetOperation(c101103037.activate) e2:SetOperation(c101103037.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function c101103037.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103037.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if chk==0 then return bc:IsAbleToDeck() end if chk==0 then return bc and bc:IsRelateToBattle() and bc:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,bc,1,0,0)
end end
function c101103037.tdop(e,tp,eg,ep,ev,re,r,rp) function c101103037.tdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -48,10 +48,10 @@ function c101103037.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,10 +48,10 @@ function c101103037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c101103037.filter(c,e,tp) function c101103037.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:GetLevel()>=5 and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101103037.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101103037.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c101103037.activate(e,tp,eg,ep,ev,re,r,rp) function c101103037.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -60,6 +60,5 @@ function c101103037.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +60,5 @@ function c101103037.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101103037.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end end
end end
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
function c101103041.initial_effect(c) function c101103041.initial_effect(c)
--フュージョン召喚 --フュージョン召喚
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,11759079,aux.FilterBoolFunction(Card.IsFusionSetCard,0x14f),2,true,false) aux.AddFusionProcCodeFun(c,11759079,aux.FilterBoolFunction(Card.IsFusionSetCard,0x14f),2,true,true)
--最初に破壊されない --最初に破壊されない
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -38,7 +38,7 @@ function c101103041.initial_effect(c) ...@@ -38,7 +38,7 @@ function c101103041.initial_effect(c)
end end
--初回は破壊されない --初回は破壊されない
function c101103041.indtg(e,c) function c101103041.indtg(e,c)
return c:IsFaceup() and c:IsType(0x14f) and c:IsType(TYPE_FUSION) return c:IsType(0x14f) and c:IsType(TYPE_FUSION)
end end
function c101103041.indct(e,re,r,rp) function c101103041.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then if bit.band(r,REASON_BATTLE)~=0 then
...@@ -50,12 +50,12 @@ function c101103041.thfilter(c) ...@@ -50,12 +50,12 @@ function c101103041.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c101103041.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103041.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103041.thfilter,tp,0,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101103041.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_SZONE,nil) local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c101103041.thop(e,tp,eg,ep,ev,re,r,rp) function c101103041.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_SZONE,nil) local g=Duel.GetMatchingGroup(c101103041.thfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
......
...@@ -31,30 +31,27 @@ function c101103044.initial_effect(c) ...@@ -31,30 +31,27 @@ function c101103044.initial_effect(c)
end end
function c101103044.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101103044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end end
function c101103044.operation(e,tp,eg,ep,ev,re,r,rp) function c101103044.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsChainDisablable(0) if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsChainDisablable(0)
and Duel.SelectYesNo(1-tp,aux.Stringid(101103044,1)) then and Duel.SelectYesNo(1-tp,aux.Stringid(101103044,1)) then
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.NegateEffect(0) Duel.NegateEffect(0)
return return
end end
if Duel.Draw(p,d,REASON_EFFECT)==2 then if Duel.Draw(tp,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(p) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
end end
function c101103044.filter(c,e,tp,g) function c101103044.filter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_HAND) and c:GetPreviousControler()~=tp and (not g or g:IsContains(c)) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_HAND) and c:GetPreviousControler()~=tp and g:IsContains(c)
end end
function c101103044.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103044.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101103044.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101103044.filter(chkc,e,tp,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103044.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,eg) end and Duel.IsExistingTarget(c101103044.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -74,6 +71,6 @@ function c101103044.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +71,6 @@ function c101103044.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end end
Duel.SpecialSummonComplete()
end end
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function c101103060.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103060.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103060.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103060.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103060.thfilter,tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101103060.thfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectTarget(tp,c101103060.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c101103060.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
...@@ -70,9 +70,6 @@ function c101103060.atkcon(e) ...@@ -70,9 +70,6 @@ function c101103060.atkcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
end end
function c101103060.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa9,0xad)
end
function c101103060.atkval(e,c) function c101103060.atkval(e,c)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)-Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0) local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)-Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)
return ct>0 and ct*200 return ct>0 and ct*200
......
...@@ -16,31 +16,35 @@ function c101103063.initial_effect(c) ...@@ -16,31 +16,35 @@ function c101103063.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(1) e2:SetValue(c101103063.eqlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--confirm --confirm
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103063,0)) e3:SetDescription(aux.Stringid(101103063,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100270206) e3:SetCountLimit(1,101103063)
e3:SetTarget(c101103063.cftg) e3:SetTarget(c101103063.cftg)
e3:SetOperation(c101103063.cfop) e3:SetOperation(c101103063.cfop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--tograve --tograve
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103063,1)) e4:SetDescription(aux.Stringid(101103063,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,101103063) e4:SetCountLimit(1,101103163)
e4:SetCondition(c101103063.thcon) e4:SetCondition(c101103063.thcon)
e4:SetCost(c101103063.thcost) e4:SetCost(c101103063.thcost)
e4:SetTarget(c101103063.thtg) e4:SetTarget(c101103063.thtg)
e4:SetOperation(c101103063.thop) e4:SetOperation(c101103063.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101103063.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c101103063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
...@@ -55,7 +59,8 @@ function c101103063.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +59,8 @@ function c101103063.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101103063.cftg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103063.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)>0 end local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsAttackAbove(1) and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)>0 end
end end
function c101103063.cfop(e,tp,eg,ep,ev,re,r,rp) function c101103063.cfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -88,10 +93,9 @@ function c101103063.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,10 +93,9 @@ function c101103063.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101103063.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103063.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c101103063.thop(e,tp,eg,ep,ev,re,r,rp) function c101103063.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not e:GetHandler():IsAbleToHand() then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler()) end
end
\ No newline at end of file
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
-- --
--"LUA BY REIKAI" --"LUA BY REIKAI"
function c101103064.initial_effect(c) function c101103064.initial_effect(c)
aux.AddRitualProcGreaterCode(c,101103037,nil,c101103064.mfilter) aux.AddRitualProcGreaterCode(c,101103037)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101103064) e1:SetCountLimit(1,101103064)
...@@ -14,44 +14,37 @@ function c101103064.initial_effect(c) ...@@ -14,44 +14,37 @@ function c101103064.initial_effect(c)
e1:SetOperation(c101103064.spop) e1:SetOperation(c101103064.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101103064.mfilter(c)
return c:IsCode(101103037)
end
function c101103064.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x10cf)
end
function c101103064.cfilter(c) function c101103064.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:GetLevel()>0 return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsLevelAbove(1) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end end
function c101103064.spzfilter(g,tp) function c101103064.fselect(g,tp)
if Duel.GetMZoneCount(tp,g,tp)<=0 then return false end Duel.SetSelectedCard(g)
return g:GetSum(Card.GetLevel)>=4 return g:CheckWithSumGreater(Card.GetLevel,4) and aux.mzctcheck(g,tp)
end end
function c101103064.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101103064.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_HAND,0)
local sg=g:Filter(c101103064.cfilter,nil) local sg=g:Filter(c101103064.cfilter,nil)
if chk==0 then return e:GetHandler():IsAbleToRemove() if chk==0 then return sg:CheckSubGroup(c101103064.fselect,1,sg:GetCount(),tp) end
and sg:GetSum(Card.GetLevel)>=4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=sg:SelectSubGroup(tp,c101103064.spzfilter,false,1,99,tp) local rg=sg:SelectSubGroup(tp,c101103064.fselect,false,1,sg:GetCount(),tp)
Duel.Remove(g1,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c101103064.spfilter(c,e,tp) function c101103064.spfilter(c,e,tp)
return c:IsCode(101103037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(101103037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101103064.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103064.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103064.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.IsExistingMatchingCard(c101103064.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c101103064.spop(e,tp,eg,ep,ev,re,r,rp) function c101103064.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not c:IsRelateToEffect(e) then return end
if not (c:IsRelateToEffect(e) and c:IsAbleToRemove() and c:IsLocation(LOCATION_GRAVE)) then return false end
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
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,c101103064.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101103064.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -32,8 +32,9 @@ function c101103065.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,8 +32,9 @@ function c101103065.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101103065.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101103065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN) local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN)
local b1=#g>=3 and Duel.GetDecktopGroup(tp,3):IsExists(Card.IsAbleToHand,1,nil) local count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local b2=#g>=6 and Duel.GetDecktopGroup(tp,6):IsExists(Card.IsAbleToHand,1,nil) local b1=#g>=3 and count>=3 and Duel.GetDecktopGroup(tp,3):IsExists(Card.IsAbleToHand,1,nil)
local b2=#g>=6 and count>=6 and Duel.GetDecktopGroup(tp,6):IsExists(Card.IsAbleToHand,1,nil)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
...@@ -56,7 +57,7 @@ function c101103065.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,7 +57,7 @@ function c101103065.target(e,tp,eg,ep,ev,re,r,rp,chk)
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_DRAW) e1:SetCode(EFFECT_CANNOT_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
...@@ -49,18 +49,17 @@ function c101103066.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,18 +49,17 @@ function c101103066.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if #tg>1 then if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
tc=tg:Select(tp,1,1,nil) tc=tg:Select(tp,1,1,nil):GetFirst()
end end
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c101103066.drop(e,tp,eg,ep,ev,re,r,rp) function c101103066.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
...@@ -75,9 +74,10 @@ function c101103066.drtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,9 +74,10 @@ function c101103066.drtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if #tg>1 then if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
tc=tg:Select(tp,1,1,nil) tc=tg:Select(tp,1,1,nil):GetFirst()
end end
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
...@@ -87,7 +87,7 @@ function c101103066.drop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,7 @@ function c101103066.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_GRAVE) then return end if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_GRAVE) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -41,6 +41,7 @@ function c101103071.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,6 +41,7 @@ function c101103071.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
for lc in aux.Next(lg) do for lc in aux.Next(lg) do
zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp)) zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp))
end end
zone=zone&0x1f
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101103071.spfilter(chkc,e,tp,zone) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101103071.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103071.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end and Duel.IsExistingTarget(c101103071.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end
...@@ -56,6 +57,7 @@ function c101103071.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +57,7 @@ function c101103071.spop(e,tp,eg,ep,ev,re,r,rp)
for lc in aux.Next(lg) do for lc in aux.Next(lg) do
zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp)) zone=bit.bor(zone,lc:GetColumnZone(LOCATION_MZONE,tp))
end end
zone=zone&0x1f
if zone~=0 then if zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end end
......
...@@ -38,7 +38,7 @@ function c101103073.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c101103073.activate(e,tp,eg,ep,ev,re,r,rp)
local lc=tg:GetFirst() local lc=tg:GetFirst()
if lc==tc then lc=tg:GetNext() end if lc==tc then lc=tg:GetNext() end
if Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT,nil)>0 and tc:IsRelateToEffect(e) then if Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT,nil)>0 and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and lc:IsFaceup() and lc:IsRelateToEffect(e) then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and lc:IsRelateToEffect(e) then
Duel.Destroy(lc,REASON_EFFECT) Duel.Destroy(lc,REASON_EFFECT)
end end
end end
......
...@@ -45,7 +45,7 @@ function c101103074.initial_effect(c) ...@@ -45,7 +45,7 @@ function c101103074.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101103074.cfilter(c,tp) function c101103074.cfilter(c,tp)
return c:GetSummonPlayer()~=tp return c:GetSummonPlayer()==1-tp
end end
function c101103074.tkcon(e,tp,eg,ep,ev,re,r,rp) function c101103074.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103074.cfilter,1,nil,tp) return eg:IsExists(c101103074.cfilter,1,nil,tp)
...@@ -63,13 +63,13 @@ function c101103074.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,13 +63,13 @@ function c101103074.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c101103074.repfilter(c,tp) function c101103074.repfilter(c)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE) return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE)
and c:IsSetCard(0x137) and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x137) and not c:IsReason(REASON_REPLACE)
end end
function c101103074.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103074.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) if chk==0 then return not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c101103074.repfilter,1,nil,tp) end and eg:IsExists(c101103074.repfilter,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function c101103074.repval(e,c) function c101103074.repval(e,c)
...@@ -78,18 +78,18 @@ end ...@@ -78,18 +78,18 @@ end
function c101103074.repop(e,tp,eg,ep,ev,re,r,rp) function c101103074.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end end
function c101103074.tfilter(c,tp) function c101103074.tfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x137) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x137)
end end
function c101103074.negcon(e,tp,eg,ep,ev,re,r,rp) function c101103074.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c101103074.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev) return g and g:IsExists(c101103074.tfilter,1,nil) and Duel.IsChainNegatable(ev)
end end
function c101103074.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103074.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
function c101103074.negop(e,tp,eg,ep,ev,re,r,rp) function c101103074.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateActivation(ev)
end end
\ No newline at end of file
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
function c101103075.initial_effect(c) function c101103075.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103075+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,101103075+EFFECT_COUNT_CODE_OATH)
...@@ -17,7 +16,7 @@ function c101103075.initial_effect(c) ...@@ -17,7 +16,7 @@ function c101103075.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101103075) e2:SetCountLimit(1,101103175)
e2:SetCondition(c101103075.cpcon) e2:SetCondition(c101103075.cpcon)
e2:SetTarget(c101103075.cptg) e2:SetTarget(c101103075.cptg)
e2:SetOperation(c101103075.cpop) e2:SetOperation(c101103075.cpop)
...@@ -30,7 +29,7 @@ function c101103075.initial_effect(c) ...@@ -30,7 +29,7 @@ function c101103075.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,101103175) e3:SetCountLimit(1,101103275)
e3:SetCondition(c101103075.spcon) e3:SetCondition(c101103075.spcon)
e3:SetCost(aux.bfgcost) e3:SetCost(aux.bfgcost)
e3:SetTarget(c101103075.sptg) e3:SetTarget(c101103075.sptg)
...@@ -65,11 +64,12 @@ function c101103075.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,11 +64,12 @@ function c101103075.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function c101103075.spfilter(c,e,tp) function c101103075.spfilter(c,e,tp)
return c:IsSetCard(0x14e) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsSetCard(0x14e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101103075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101103075.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101103075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101103075.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101103075.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101103075.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101103075.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -33,7 +33,12 @@ function c101103076.desfilter(c,e,tp) ...@@ -33,7 +33,12 @@ function c101103076.desfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x14f) and lv>0 and Duel.IsExistingMatchingCard(c101103076.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,lv,c) return c:IsFaceup() and c:IsSetCard(0x14f) and lv>0 and Duel.IsExistingMatchingCard(c101103076.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,lv,c)
end end
function c101103076.spfilter(c,e,tp,lv,rc) function c101103076.spfilter(c,e,tp,lv,rc)
return c:IsSetCard(0x14f) and c:IsLevel(lv-1,lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,rc,tp)>0 or Duel.GetLocationCountFromEx(tp,tp,rc)>0) if not (c:IsSetCard(0x14f) and c:IsLevel(lv-1,lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
if c:IsLocation(LOCATION_DECK) then
return Duel.GetMZoneCount(tp,rc)>0
else
return Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end
end end
function c101103076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103076.desfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101103076.desfilter(chkc,e,tp) end
......
...@@ -43,7 +43,7 @@ function c101103077.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function c101103077.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c101103077.tffilter(c) function c101103077.tffilter(c)
return c:IsFaceup() and c:IsCode(74665651,1050355) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(74665651,1050355)
end end
function c101103077.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c101103077.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103077.tffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101103077.tffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
...@@ -63,12 +63,13 @@ function c101103077.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,12 +63,13 @@ function c101103077.tfop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) if Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then
local g=Duel.GetMatchingGroup(c101103077.spfilter,tp,LOCATION_HAND,0,nil,e,tp,tc:GetCode()) local g=Duel.GetMatchingGroup(c101103077.spfilter,tp,LOCATION_HAND,0,nil,e,tp,tc:GetCode())
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101103077,1)) then if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101103077,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
...@@ -5,7 +5,7 @@ function c101103078.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101103078.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101103078.cost) e1:SetCost(c101103078.cost)
...@@ -19,18 +19,19 @@ function c101103078.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,18 +19,19 @@ function c101103078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
end end
function c101103078.costfilter(c) function c101103078.costfilter(c,tp)
return c:IsRace(RACE_MACHINE) return c:IsRace(RACE_MACHINE) and (c:IsControler(tp) or c:IsFaceup()) and c:GetTextAttack()>=1000
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
function c101103078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101103078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local dc=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) if chkc then return chkc:IsOnField() end
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101103078.costfilter,1,nil) return Duel.CheckReleaseGroup(tp,c101103078.costfilter,1,nil,tp)
end end
local g=Duel.SelectReleaseGroup(tp,c101103078.costfilter,1,1,nil) local g=Duel.SelectReleaseGroup(tp,c101103078.costfilter,1,1,nil,tp)
local atk=g:GetFirst():GetAttack() local atk=g:GetFirst():GetTextAttack()
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local ct=math.floor(atk/1000) local ct=math.floor(atk/1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
...@@ -42,4 +43,4 @@ function c101103078.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,4 +43,4 @@ function c101103078.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -38,6 +38,7 @@ function c101103080.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,7 @@ function c101103080.activate(e,tp,eg,ep,ev,re,r,rp)
local gnum=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0) local gnum=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local dg=Duel.SelectMatchingCard(tp,c101103080.filter,tp,0,LOCATION_MZONE,1,1,nil) local dg=Duel.SelectMatchingCard(tp,c101103080.filter,tp,0,LOCATION_MZONE,1,1,nil)
if #dg==0 then return end
local mon=dg:GetFirst() local mon=dg:GetFirst()
local lnum=mon:GetLevel() local lnum=mon:GetLevel()
--The equation --The equation
......
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