Commit 179b4d31 authored by mercury233's avatar mercury233

fix

parent b7904f8b
...@@ -43,8 +43,8 @@ function s.ocfilter(c) ...@@ -43,8 +43,8 @@ function s.ocfilter(c)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_MZONE,0,1,nil)
or Duel.IsExistingMatchingCard(s.ocfilter,1-tp,LOCATION_ONFIELD,0,1,nil) or Duel.IsExistingMatchingCard(s.ocfilter,tp,0,LOCATION_MZONE,1,nil)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.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
......
...@@ -65,11 +65,12 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,11 +65,12 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+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
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
--電極獣カチオン --電極獣カチオン
function c21291696.initial_effect(c) function c21291696.initial_effect(c)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21291696,0)) e1:SetDescription(aux.Stringid(21291696,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
...@@ -10,6 +11,7 @@ function c21291696.initial_effect(c) ...@@ -10,6 +11,7 @@ function c21291696.initial_effect(c)
e1:SetTarget(c21291696.thtg) e1:SetTarget(c21291696.thtg)
e1:SetOperation(c21291696.thop) e1:SetOperation(c21291696.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21291696,1)) e2:SetDescription(aux.Stringid(21291696,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
...@@ -26,7 +28,6 @@ end ...@@ -26,7 +28,6 @@ end
function c21291696.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c21291696.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21291696.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c21291696.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end end
function c21291696.sumfilter(c) function c21291696.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_THUNDER) and c:IsLevelBelow(4) return c:IsSummonable(true,nil) and c:IsRace(RACE_THUNDER) and c:IsLevelBelow(4)
...@@ -38,10 +39,10 @@ function c21291696.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,10 +39,10 @@ function c21291696.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if Duel.IsExistingMatchingCard(c21291696.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) if Duel.IsExistingMatchingCard(c21291696.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(21291696,2)) then and Duel.SelectYesNo(tp,aux.Stringid(21291696,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c21291696.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c21291696.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
...@@ -65,10 +66,11 @@ function c21291696.lvfilter(c,lv) ...@@ -65,10 +66,11 @@ function c21291696.lvfilter(c,lv)
return c:IsFaceup() and c:IsRace(RACE_THUNDER) and not c:IsLevel(lv) and c:IsLevelAbove(1) return c:IsFaceup() and c:IsRace(RACE_THUNDER) and not c:IsLevel(lv) and c:IsLevelAbove(1)
end end
function c21291696.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21291696.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21291696.lvfilter(chkc,e:GetHandler():GetLevel()) end local lv=e:GetHandler():GetLevel()
if chk==0 then return Duel.IsExistingTarget(c21291696.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21291696.lvfilter(chkc,lv) end
if chk==0 then return Duel.IsExistingTarget(c21291696.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c21291696.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) Duel.SelectTarget(tp,c21291696.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,lv)
end end
function c21291696.lvop(e,tp,eg,ep,ev,re,r,rp) function c21291696.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -24,95 +24,75 @@ function s.initial_effect(c) ...@@ -24,95 +24,75 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.filter(c,e,tp,check) function s.filter(c,e,tp,check)
local id=c:GetCode() local check2=check and Duel.GetMZoneCount(tp,c)>0
return c:IsRace(RACE_FISH) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,check,id) return c:IsRace(RACE_FISH) and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,check2,c:GetCode())
end end
function s.thfilter(c,e,tp,check,id) function s.thfilter(c,e,tp,check,code)
return c:IsCode(id) and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return c:IsCode(code) and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function s.spfilter(c) function s.spcfilter(c)
return c:IsRace(RACE_FISH) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() return c:IsRace(RACE_FISH) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) local check=Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil)
if check then e:SetLabel(1) else e:SetLabel(0) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp,check) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp,check) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp,check) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp,check) end
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,check) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,check)
if check then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local id=tc:GetCode() local code=tc:GetCode()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_FISH) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FISH)
if Duel.Destroy(tc,REASON_EFFECT)>0 then and Duel.Destroy(tc,REASON_EFFECT)>0 then
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>=0 and e:GetLabel()==1 local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetLabel()==1
local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check,id):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if check and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not sc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check,code):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) if not sc then return end
else if check and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not sc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SendtoHand(sc,nil,REASON_EFFECT) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,sc) else
end Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
end end
end end
end end
function s.tdfilter(c,e,tp) function s.tgfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsRace(RACE_FISH) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,c,c:GetCode()) return c:IsCanBeEffectTarget(e) and c:IsRace(RACE_FISH)
and c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.fselect(g,e,tp) function s.tdfilter1(c,g,e,tp)
return g:GetClassCount(Card.GetCode)==1 and g:IsExists(s.fcheck,1,nil,g,e,tp) return c:IsAbleToDeck() and g:IsExists(Card.IsCanBeSpecialSummoned,1,c,e,0,tp,false,false)
end end
function s.fcheck(c,g,e,tp) function s.fselect(g,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return g:GetClassCount(Card.GetCode)==1 and g:IsExists(s.tdfilter1,1,nil,g,e,tp)
and g:IsExists(s.fcheck2,1,c)
end
function s.fcheck2(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToDeck()
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc,e,tp) end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:CheckSubGroup(s.fselect,2,2,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:CheckSubGroup(s.fselect,2,2,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,e,tp) local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,e,tp)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
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 s.cfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLocation(LOCATION_GRAVE)
end
function s.cfilter2(c,e,tp)
return not c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToDeck()
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetTargetsRelateToChain()
if not g or g:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end if #g~=2 then return end
local exg=nil
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sc=nil exg=g:Filter(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false)
local dc=nil if #exg==2 then exg=nil end
if g and g:GetCount()==2 then end
if g:FilterCount(s.cfilter,nil,e,tp)==2 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local dc=g:FilterSelect(tp,Card.IsAbleToDeck,1,1,exg):GetFirst()
local dc=g:Select(tp,1,1,nil) if not dc then return end
local sc=(g-dc):GetFirst() g:RemoveCard(dc)
Duel.SendtoDeck(dc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) Duel.SendtoDeck(dc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
local sg=Duel.GetOperatedGroup() if dc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) or sg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dc=g:FilterSelect(tp,s.cfilter2,1,1,nil,e,tp)
local sc=(g-dc):GetFirst()
Duel.SendtoDeck(dc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
local sg=Duel.GetOperatedGroup()
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) or sg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end end
end end
...@@ -27,7 +27,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p,1) and Duel.GetMatchingGroupCount(s.filter,p,LOCATION_MZONE,LOCATION_MZONE,nil)>=3 and Duel.SelectYesNo(p,aux.Stringid(id,0)) then if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(p,1)
and Duel.GetMatchingGroupCount(s.filter,p,LOCATION_MZONE,LOCATION_MZONE,nil)>=3
and Duel.SelectYesNo(p,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(p,1,REASON_EFFECT) Duel.Draw(p,1,REASON_EFFECT)
end end
......
...@@ -36,7 +36,7 @@ function s.initial_effect(c) ...@@ -36,7 +36,7 @@ function s.initial_effect(c)
end end
function s.stfilter(c) function s.stfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1a8) and c:IsSSetable() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1a8) and c:IsSSetable()
and c.set_as_spell and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c.set_as_spell and c:IsFaceupEx()
end end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
......
...@@ -17,25 +17,24 @@ function c42427230.initial_effect(c) ...@@ -17,25 +17,24 @@ function c42427230.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,42427231) e2:SetCountLimit(1,42427231)
e2:SetTarget(c42427230.destg) e2:SetTarget(c42427230.destg)
e2:SetOperation(c42427230.desop) e2:SetOperation(c42427230.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c42427230.cfilter(c,tp) function c42427230.cfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsCode(42427230) and c:IsReleasable() return (c:IsControler(tp) or c:IsFaceup()) and c:IsCode(42427230)
end end
function c42427230.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c42427230.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetMatchingGroup(c42427230.cfilter,tp,LOCATION_MZONE,0,nil,tp) local rg=Duel.GetMatchingGroup(c42427230.cfilter,tp,LOCATION_MZONE,0,nil,tp)
if chk==0 then return rg:GetCount()==Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,42427230):GetCount() and rg:GetCount()~=0 and Duel.GetMZoneCount(tp,rg)>0 end if chk==0 then return rg:GetCount()==rg:FilterCount(Card.IsReleasable,nil)
and rg:GetCount()~=0 and Duel.GetMZoneCount(tp,rg)>0 end
local ct=Duel.Release(rg,REASON_COST)*2 local ct=Duel.Release(rg,REASON_COST)*2
e:SetLabel(ct) e:SetLabel(ct)
end end
function c42427230.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c42427230.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,42427231,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_FIRE) end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,42427231,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_FIRE) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
...@@ -74,9 +73,9 @@ function c42427230.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,9 +73,9 @@ function c42427230.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c42427230.damop(e,tp,eg,ep,ev,re,r,rp) function c42427230.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=e:GetLabel() local p=e:GetLabel()
if c:IsReason(REASON_DESTROY) then if c:IsReason(REASON_DESTROY) then
Duel.Damage(1-tp,500,REASON_EFFECT) Duel.Damage(1-p,500,REASON_EFFECT)
end end
e:Reset() e:Reset()
end end
...@@ -88,7 +87,7 @@ function c42427230.desfilter2(c,e) ...@@ -88,7 +87,7 @@ function c42427230.desfilter2(c,e)
end end
function c42427230.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c42427230.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c42427230.desfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c42427230.desfilter(chkc) end
local g=Duel.GetMatchingGroup(c42427230.desfilter2,tp,LOCATION_MZONE,0,nil,e) local g=Duel.GetMatchingGroup(c42427230.desfilter2,tp,LOCATION_ONFIELD,0,nil,e)
if chk==0 then return g:GetCount()~=0 end if chk==0 then return g:GetCount()~=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,g:GetCount(),nil) local sg=g:Select(tp,1,g:GetCount(),nil)
......
...@@ -84,7 +84,7 @@ end ...@@ -84,7 +84,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,aux.ExceptThisCard(e),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
......
...@@ -124,13 +124,14 @@ function s.spfilter(c,e,tp) ...@@ -124,13 +124,14 @@ function s.spfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.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
......
--電極獣アニオン --電極獣アニオン
function c58680635.initial_effect(c) function c58680635.initial_effect(c)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58680635,0)) e1:SetDescription(aux.Stringid(58680635,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
...@@ -10,6 +11,7 @@ function c58680635.initial_effect(c) ...@@ -10,6 +11,7 @@ function c58680635.initial_effect(c)
e1:SetTarget(c58680635.lvtg) e1:SetTarget(c58680635.lvtg)
e1:SetOperation(c58680635.lvop) e1:SetOperation(c58680635.lvop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(58680635,1)) e2:SetDescription(aux.Stringid(58680635,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
...@@ -36,7 +38,7 @@ function c58680635.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +38,7 @@ function c58680635.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(4) e1:SetValue(4)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if c:IsLevel(4) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c58680635.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) if c:IsLevel(4) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c58680635.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(58680635,2)) then and Duel.SelectYesNo(tp,aux.Stringid(58680635,2)) then
...@@ -65,7 +67,7 @@ function c58680635.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +67,7 @@ function c58680635.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc) local g=Group.FromCards(c,tc)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==2 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.thfilter(c,check) function s.thfilter(c,check)
return c:IsAbleToHand() return c:IsAbleToHand()
and ( c:IsCode(24878656) or (check and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4)) ) and (c:IsCode(24878656) or (check and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4)))
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsFaceup() and c:IsCode(24878656) return c:IsFaceup() and c:IsCode(24878656)
......
...@@ -9,6 +9,7 @@ function s.initial_effect(c) ...@@ -9,6 +9,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69925461,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -20,7 +21,7 @@ function s.initial_effect(c) ...@@ -20,7 +21,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--release & spsummon --release & spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(51617185,0)) e3:SetDescription(aux.Stringid(69925461,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -59,7 +60,8 @@ end ...@@ -59,7 +60,8 @@ end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_ONFIELD,0,1,nil) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,check) return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,check)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
......
...@@ -12,12 +12,13 @@ function c74055055.initial_effect(c) ...@@ -12,12 +12,13 @@ function c74055055.initial_effect(c)
e1:SetOperation(c74055055.activate) e1:SetOperation(c74055055.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c74055055.filter(c) function c74055055.filter(c,e)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end end
function c74055055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74055055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c74055055.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c74055055.filter(chkc,e) end
local g=Duel.GetMatchingGroup(c74055055.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c74055055.filter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
......
--シンクロ・パニック --シンクロ・パニック
function c83962752.initial_effect(c) function c83962752.initial_effect(c)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83962752,0)) e1:SetDescription(aux.Stringid(83962752,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -10,6 +11,7 @@ function c83962752.initial_effect(c) ...@@ -10,6 +11,7 @@ function c83962752.initial_effect(c)
e1:SetTarget(c83962752.target) e1:SetTarget(c83962752.target)
e1:SetOperation(c83962752.activate) e1:SetOperation(c83962752.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
......
...@@ -30,13 +30,14 @@ function s.initial_effect(c) ...@@ -30,13 +30,14 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spfilter(c,tp) function s.spfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER) and c:IsSummonPlayer(tp) and c:IsFaceup() return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSummonPlayer(tp) and c:IsFaceup()
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.spfilter,1,nil,tp) return eg:IsExists(s.spfilter,1,nil,tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 s.tgfilter(c) function s.tgfilter(c)
......
--サクリファイス・ランクアップ --サクリファイス・ランクアップ
function c94185340.initial_effect(c) function c94185340.initial_effect(c)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94185340,0)) e1:SetDescription(aux.Stringid(94185340,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -21,21 +22,22 @@ function c94185340.filter2(c,e,tp,rk) ...@@ -21,21 +22,22 @@ function c94185340.filter2(c,e,tp,rk)
end end
function c94185340.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94185340.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c94185340.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c94185340.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c94185340.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.IsExistingTarget(c94185340.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c94185340.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c94185340.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
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 c94185340.activate(e,tp,eg,ep,ev,re,r,rp) function c94185340.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local g=tc:GetOverlayGroup() local g=tc:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:FilterSelect(tp,Card.IsAbleToRemove,2,2,nil,POS_FACEUP) local rg=g:FilterSelect(tp,Card.IsAbleToRemove,2,2,nil,POS_FACEUP)
if rg and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==2 then if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==2 and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c94185340.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+1) local sg=Duel.SelectMatchingCard(tp,c94185340.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank()+1)
local sc=g:GetFirst() local sc=sg:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(94185340,1)) e1:SetDescription(aux.Stringid(94185340,1))
......
--地縛共振 --地縛共振
function c95207988.initial_effect(c) function c95207988.initial_effect(c)
--
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(95207988,0)) e2:SetDescription(aux.Stringid(95207988,0))
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
...@@ -16,6 +18,7 @@ function c95207988.initial_effect(c) ...@@ -16,6 +18,7 @@ function c95207988.initial_effect(c)
e2:SetTarget(c95207988.damtg) e2:SetTarget(c95207988.damtg)
e2:SetOperation(c95207988.damop) e2:SetOperation(c95207988.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(95207988,1)) e3:SetDescription(aux.Stringid(95207988,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -54,13 +57,15 @@ end ...@@ -54,13 +57,15 @@ end
function c95207988.damop(e,tp,eg,ep,ev,re,r,rp) function c95207988.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Damage(tp,tc:GetAttack()/2,REASON_EFFECT) Duel.Damage(tp,tc:GetAttack()/2,REASON_EFFECT,true)
Duel.Damage(1-tp,tc:GetAttack()/2,REASON_EFFECT) Duel.Damage(1-tp,tc:GetAttack()/2,REASON_EFFECT,true)
Duel.RDComplete()
end end
end end
function c95207988.descon(e,tp,eg,ep,ev,re,r,rp) function c95207988.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_DARK) and tc:IsType(TYPE_SYNCHRO) and tc:IsSummonLocation(LOCATION_EXTRA) return tc:IsControler(tp) and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_DARK)
and tc:IsType(TYPE_SYNCHRO) and tc:IsSummonLocation(LOCATION_EXTRA)
end end
function c95207988.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95207988.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment