Commit 5e134407 authored by wind2009's avatar wind2009

Fix

parent 7195ee99
No preview for this file type
......@@ -72,6 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.xyzlv)
e1:SetLabel(c:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......@@ -81,6 +82,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(s.xyzlv)
e2:SetLabel(tc:GetLevel())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
......
......@@ -10,7 +10,7 @@ function s.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--special summon
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
......@@ -80,20 +80,17 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if e:IsCostChecked() then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
elseif op==2 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.Destroy(c,REASON_EFFECT)>0 then
if e:GetLabel()==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetLabel()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
--道化の一座 ホワイトフェイス
local s,id,o=GetID()
CATEGORY_MSET =0x100000000 --包含盖放怪兽的效果
function s.initial_effect(c)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
......@@ -25,7 +26,7 @@ function s.initial_effect(c)
--summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetCategory(CATEGORY_SUMMON+CATEGORY_MSET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
......@@ -90,6 +91,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if op==1 then
Duel.Draw(tp,ct,REASON_EFFECT)
elseif op==2 then
if not Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,ct,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,ct,ct,nil)
if g:GetCount()>0 then
......@@ -125,7 +127,7 @@ function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase()
end
function s.sumfilter(c)
return c:IsSummonable(true,nil,1)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
......@@ -136,6 +138,12 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
--妖精伝姫-マチリル
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,91957038,id+o)
aux.AddCodeList(c,91957038,19144623)
--special suoomn
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -51,7 +51,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -86,7 +86,7 @@ function s.codecost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,500)
end
function s.codefilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsCode(id+o)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsCode(19144623)
end
function s.codetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.codefilter,tp,0,LOCATION_MZONE,nil)
......@@ -96,15 +96,15 @@ function s.codeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.codefilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(id+o)
e1:SetValue(19144623)
tc:RegisterEffect(e1)
end
end
......@@ -132,7 +132,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():IsFacedown()
and (CATEGORY_MSET and re:IsHasCategory(CATEGORY_MSET) or CATEGORY_SSET and re:IsHasCategory(CATEGORY_SSET))
and (re:IsHasCategory(CATEGORY_MSET) or re:IsHasCategory(CATEGORY_SSET))
end
function s.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -163,20 +163,20 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local dg=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.ShuffleHand(tp)
if g:GetCount()>0 then
local sc=g:GetFirst()
if sg:GetCount()>0 then
local sc=sg:GetFirst()
local hint=sc:IsPublic()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if hint then
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,sg)
end
end
end
......
......@@ -145,7 +145,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if c:IsStatus(STATUS_BATTLE_DESTROYED) or rp~=1-tp then return false end
if not c:IsFacedown() then return false end
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and Duel.IsChainNegatable(i) then
return Duel.GetCurrentChain()>2
end
......
......@@ -24,6 +24,7 @@ function s.initial_effect(c)
--Material Effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
......
--妖精伝姫を紡ぐ者
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101304116)
aux.AddCodeList(c,19144623)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x2db),aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),true)
......@@ -36,7 +36,7 @@ function s.initial_effect(c)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(aux.TargetBoolFunction(Card.IsCode,101304116))
e4:SetTarget(aux.TargetBoolFunction(Card.IsCode,19144623))
e4:SetValue(RACE_SPELLCASTER)
c:RegisterEffect(e4)
end
......@@ -64,7 +64,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp)
end
function s.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116))
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(19144623))
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end
......@@ -76,7 +76,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToChain()
and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(101304116)) then
and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(19144623)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -96,7 +96,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(101304116)
e3:SetValue(19144623)
tc:RegisterEffect(e3)
end
end
--妖精伝姫を語る者
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101304116)
aux.AddCodeList(c,19144623)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,s.mfilter,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),true)
......@@ -70,7 +70,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsFusionCode,1,nil,101304116) then
if g:IsExists(Card.IsFusionCode,1,nil,19144623) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
......
--妖精伝姫の舞踏会
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,91957038,101304116)
aux.AddCodeList(c,91957038,19144623)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -48,7 +48,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function s.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116))
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(19144623))
end
function s.mfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2db)
......@@ -64,7 +64,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER)
and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(101304116)) then
and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(19144623)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -84,7 +84,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(101304116)
e3:SetValue(19144623)
tc:RegisterEffect(e3)
end
end
--テールズオブ妖精伝姫
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101304116)
aux.AddCodeList(c,19144623)
aux.AddEquipSpellEffect(c,true,true,Card.IsFaceup,nil)
--Atk up
local e1=Effect.CreateEffect(c)
......@@ -31,7 +31,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.filter0(c)
return c:IsFaceup() and c:IsCode(101304116) and c:IsCanBeFusionMaterial()
return c:IsFaceup() and c:IsCode(19144623) and c:IsCanBeFusionMaterial()
end
function s.filter1(c,e)
return c and not c:IsImmuneToEffect(e)
......
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