Commit 841f1ff8 authored by POLYMER's avatar POLYMER

fix

parent 1a2aab97
......@@ -35,25 +35,25 @@ end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x409) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdfilter(c,e,tp)
function s.tdfilter(c,tp)
return c:IsAbleToDeck() and (c:IsLocation(0x02) or (c:IsSetCard(0x409) and c:IsFaceup()))
and (Duel.GetLocationCount(tp,0x04)>0 or (c:IsLocation(0x04) and c:GetSequence()<5))
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,0x01,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.tdfilter,tp,0x0e,0,1,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,0x0e,0,1,1,nil,tp)
if tg:GetFirst():IsLocation(0x0c) then Duel.HintSelection(tg) end
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)==0 or not tc:IsLocation(0x41) then return end
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_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0x01,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -61,7 +61,7 @@ end
function c12866610.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c12866610.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
......@@ -76,7 +76,7 @@ function c12866610.tgcon(e,tp,eg,ep,ev,re,r,rp)
end
function c12866610.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToGrave() end
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE))end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,rc,1,0,0)
end
function c12866610.tgop(e,tp,eg,ep,ev,re,r,rp)
......
--诅咒恶魔
local s,id,o=GetID()
function s.initial_effect(c)
function c12866635.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c12866635.splimit)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,12866635)
e1:SetTarget(c12866635.eqtg)
e1:SetOperation(c12866635.eqop)
c:RegisterEffect(e1)
--equip
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,12866636)
e2:SetCondition(c12866635.tgcon)
e2:SetTarget(c12866635.tgtg)
e2:SetOperation(c12866635.tgop)
c:RegisterEffect(e2)
--to grave 2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,12866637)
e3:SetCondition(c12866635.condition)
e3:SetTarget(c12866635.target)
e3:SetOperation(c12866635.operation)
c:RegisterEffect(e3)
end
function s.splimit(e,se,sp,st)
function c12866635.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c9911426.rcfilter(c)
return c:IsFaceupEx() and c:GetAttack()>0
function c12866635.cfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
and Duel.IsExistingMatchingCard(c12866635.eqfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
end
function c12866635.eqfilter(c,tp)
return c:IsRace(RACE_FIEND) and not c:IsSummonableCard() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c12866635.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12866635.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c12866635.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c12866635.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c9911426.rcfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9911426.rcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c9911426.rcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local atk=g:GetFirst():GetAttack()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
function c12866635.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and not c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(9)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
function c12866635.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c12866635.eqfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tp):GetFirst()
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c12866635.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
if not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c12866635.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(12866635,1)) then
--spsummon
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c12866635.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c12866635.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c12866635.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg)
end
function c12866635.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetEquipTarget():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tc,1,0,0)
end
function c12866635.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=c:GetEquipTarget():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c12866635.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c12866635.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c12866635.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -59,7 +59,7 @@ function c12866650.cfilter(c,tp)
and Duel.IsExistingMatchingCard(c12866650.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c12866650.thfilter(c,code)
return c:IsSetCard(0x9a7c) and not c:IsCode(code) and c:IsAbleToHand()
return c:IsSetCard(0x9a7c) and not c:IsCode(code) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c12866650.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12866650.cfilter(chkc,tp) end
......
......@@ -29,7 +29,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.costfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c,e,tp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c,e,tp)
and Duel.GetMZoneCount(tp,c)>0
end
function s.spfilter(c,tc,e,tp)
......
......@@ -65,7 +65,7 @@ function c75075612.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75075612.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,ct,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c75075612.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
local tc=g:GetFirst()
while tc do
......
......@@ -14,6 +14,7 @@ function c98920437.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c98920437.efilter)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
......
......@@ -25,7 +25,8 @@ function c98921007.initial_effect(c)
c:RegisterEffect(e2)
end
function c98921007.spfilter(c,e,tp)
return c:IsSetCard(0x1130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x1130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c98921007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) 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