Commit d81c6f43 authored by Nemo Ma's avatar Nemo Ma

fix

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