Commit d81c6f43 authored by Nemo Ma's avatar Nemo Ma

fix

parent 0c3fd148
...@@ -31,7 +31,7 @@ function c118776531.initial_effect(c) ...@@ -31,7 +31,7 @@ function c118776531.initial_effect(c)
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,10467) e4:SetCountLimit(1,118776532)
e4:SetCondition(c118776531.thcon) e4:SetCondition(c118776531.thcon)
e4:SetTarget(c118776531.thtg) e4:SetTarget(c118776531.thtg)
e4:SetOperation(c118776531.thop) e4:SetOperation(c118776531.thop)
...@@ -268,4 +268,3 @@ Effect.SetValue=function(effect,value) ...@@ -268,4 +268,3 @@ Effect.SetValue=function(effect,value)
return sv(effect,0) return sv(effect,0)
end end
]] ]]
--青き眼の狂人
function c118824150.initial_effect(c) function c118824150.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,118824150) e1:SetCountLimit(1,118824150)
e1:SetCost(c118824150.drcost) e1:SetCost(c118824150.dwcost)
e1:SetTarget(c118824150.drtg) e1:SetTarget(c118824150.dwtg)
e1:SetOperation(c118824150.drop) e1:SetOperation(c118824150.dwop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(118824150,0)) e2:SetDescription(aux.Stringid(118824150,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
...@@ -19,63 +21,67 @@ function c118824150.initial_effect(c) ...@@ -19,63 +21,67 @@ function c118824150.initial_effect(c)
e2:SetTarget(c118824150.sptg) e2:SetTarget(c118824150.sptg)
e2:SetOperation(c118824150.spop) e2:SetOperation(c118824150.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,118824152) e3:SetCountLimit(1,118824152)
e3:SetCondition(c118824150.thcon) e3:SetCondition(c118824150.thcon)
e3:SetTarget(c118824150.thtg) e3:SetTarget(c118824150.thtg)
e3:SetOperation(c118824150.thop) e3:SetOperation(c118824150.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--revive
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(118824150,1)) e4:SetDescription(aux.Stringid(118824150,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,118824153) e4:SetCountLimit(1,118824153)
e4:SetCost(c118824150.sccost) e4:SetRange(LOCATION_GRAVE)
e4:SetTarget(c118824150.sctg) e4:SetCost(c118824150.rvcost)
e4:SetOperation(c118824150.scop) e4:SetTarget(c118824150.rvtg)
e4:SetOperation(c118824150.rvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c118824150.cfilter(c) function c118824150.dwfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsDiscardable() return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable()
end end
function c118824150.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.dwcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c118824150.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c118824150.dwfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c118824150.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c118824150.dwfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(e:GetHandler()) g:AddCard(c)
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c118824150.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.dwtg(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.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c118824150.drop(e,tp,eg,ep,ev,re,r,rp) function c118824150.dwop(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)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c118824150.spcostfilter(c)
return c:IsSetCard(0xdd) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() function c118824150.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xdd) and c:IsAbleToDeckOrExtraAsCost()
end end
function c118824150.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c118824150.spcostfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c118824150.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c118824150.spcostfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c118824150.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,0,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function c118824150.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c118824150.spop(e,tp,eg,ep,ev,re,r,rp) function c118824150.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -83,11 +89,12 @@ function c118824150.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,11 +89,12 @@ function c118824150.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c118824150.thcon(e,tp,eg,ep,ev,re,r,rp) function c118824150.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c118824150.thfilter(c) function c118824150.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and c:IsType(TYPE_TUNER) and c:IsAbleToHand() and not c:IsCode(118824150) return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and not c:IsCode(118824150) and c:IsAbleToHand()
end end
function c118824150.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c118824150.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c118824150.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -101,22 +108,28 @@ function c118824150.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,22 +108,28 @@ function c118824150.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c118824150.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() function c118824150.rvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c118824150.scfilter(c,e,tp) function c118824150.rvfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,true,true)
end end
function c118824150.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c118824150.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c118824150.scfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c118824150.rvfilter(chkc,e,tp) end
local g=Duel.SelectTarget(tp,c118824150.scfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) and Duel.IsExistingTarget(c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
function c118824150.scop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectTarget(tp,c118824150.rvfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if not g or g:FilterCount(Card.IsRelateToEffect,nil,e)~=1 then return end end
Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP) function c118824150.rvop(e,tp,eg,ep,ev,re,r,rp)
g:GetFirst():CompleteProcedure() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,true,true,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end end
...@@ -142,7 +142,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -142,7 +142,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg) Duel.HintSelection(tg)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
end end
end end
end 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