Commit 68aa890f authored by wind2009's avatar wind2009

Fix

parent 24c7d772
No preview for this file type
--妖精伝姫-マチリル --妖精伝姫マチリル
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,91957038,id+o) aux.AddCodeList(c,91957038,id+o)
......
...@@ -57,14 +57,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,14 +57,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x2db) and c:IsControler(tp) return c:IsFaceup() and c:IsSetCard(0x2db) and c:IsSummonPlayer(tp)
and not c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsAttribute(ATTRIBUTE_EARTH)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) 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) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.disfilter(c) function s.disfilter(c)
return aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116) return c:IsFaceup() and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116))
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end
...@@ -80,19 +80,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,19 +80,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(101304116) e3:SetValue(101304116)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
......
...@@ -77,8 +77,7 @@ function s.valcheck(e,c) ...@@ -77,8 +77,7 @@ function s.valcheck(e,c)
end end
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
return rp==1-tp and Duel.IsChainNegatable(ev)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0x2db) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x2db) and c:IsAbleToRemoveAsCost()
...@@ -97,7 +96,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,7 +96,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
\ No newline at end of file
--妖精伝姫-ウィキャット --妖精伝姫ウィキャット
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--xyz summon --xyz summon
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
--return --return
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
...@@ -39,7 +39,7 @@ function s.initial_effect(c) ...@@ -39,7 +39,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.etg(e,c) function s.etg(e,c)
return c:IsSetCard(0x2db) and c:GetOriginalAttribute()==ATTRIBUTE_LIGHT return c:IsFaceup() and c:IsSetCard(0x2db) and c:GetOriginalAttribute()&ATTRIBUTE_LIGHT~=0
end end
function s.efilter(e,re) function s.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetOwnerPlayer() and re:IsActivated() return re:GetOwnerPlayer()~=e:GetOwnerPlayer() and re:IsActivated()
...@@ -59,15 +59,18 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,15 +59,18 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,e:GetLabel(),tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
local ct=e:GetLabel()
if not g:GetCount()<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,e:GetLabel(),e:GetLabel(),nil) local sg=g:Select(tp,ct,ct,nil)
if g:GetCount()>0 then if sg:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
end end
function s.tfilter(c) function s.tfilter(c)
return c:IsFaceup() and c:IsAbleToGrave() return c:IsFaceup() and c:IsAbleToGrave()
and c:IsSetCard(0x2db) and c:GetOriginalAttribute()==ATTRIBUTE_LIGHT and c:IsSetCard(0x2db) and c:GetOriginalAttribute()&ATTRIBUTE_LIGHT~=0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tfilter(chkc) end
...@@ -85,8 +88,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,8 +88,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToChain() or not aux.NecroValleyFilter()(c) then return end if not c:IsRelateToChain() or not aux.NecroValleyFilter()(c) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
No preview for this file type
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