Commit fc0d07e5 authored by POLYMER's avatar POLYMER

fix

parent 0120e7e6
...@@ -37,8 +37,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,8 +37,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -61,7 +60,7 @@ function s.fi1ter(c,tp) ...@@ -61,7 +60,7 @@ function s.fi1ter(c,tp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsControlerCanBeChanged() and c:IsLocation(0x04) return c:IsFaceup() and c:IsControler(1-tp) and c:IsControlerCanBeChanged() and c:IsLocation(0x04)
end end
function s.fi2ter(c,e,tp) function s.fi2ter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(1-tp) and c:IsControlerCanBeChanged() and c:IsLocation(0x04) return c:IsRelateToEffect(e) and s.fi1ter(c,tp)
end end
function s.cicon(e,tp,eg,ep,ev,re,r,rp) function s.cicon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
......
--支配恶魔 --支配恶魔
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit()
--add code
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PREDRAW) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(0xff) e1:SetValue(12847313)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c:EnableReviveLimit()
--cannot special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--to grave&special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,id)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
end end
function s.op(e,tp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("这张卡的lua还没有完成") local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==tp and re:IsActiveType(TYPE_MONSTER) and race&RACE_FIEND>0 and not re:GetHandler():IsSummonableCard()
and ((re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.GetFlagEffect(tp,id)==0)
or (re:GetHandler():IsAttribute(ATTRIBUTE_EARTH) and Duel.GetFlagEffect(tp,id+o)==0)
or (re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and Duel.GetFlagEffect(tp,id+o*2)==0)
or (re:GetHandler():IsAttribute(ATTRIBUTE_FIRE) and Duel.GetFlagEffect(tp,id+o*3)==0)
or (re:GetHandler():IsAttribute(ATTRIBUTE_WIND) and Duel.GetFlagEffect(tp,id+o*4)==0))
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
local b1=rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE)
local b2=(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and rc:IsCanBeSpecialSummoned(e,0,tp,false,false))
if chk==0 then return b1 or b2 end
if re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
elseif re:GetHandler():IsAttribute(ATTRIBUTE_EARTH) then
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
elseif re:GetHandler():IsAttribute(ATTRIBUTE_WATER) then
Duel.RegisterFlagEffect(tp,id+o*2,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
elseif re:GetHandler():IsAttribute(ATTRIBUTE_FIRE) then
Duel.RegisterFlagEffect(tp,id+o*3,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
elseif re:GetHandler():IsAttribute(ATTRIBUTE_WIND) then
Duel.RegisterFlagEffect(tp,id+o*4,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
Duel.SetTargetCard(rc)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if re:GetHandler():IsRelateToEffect(re) then
local tc=Duel.GetFirstTarget()
local b1=tc:IsAbleToGrave() and not re:GetHandler():IsLocation(LOCATION_GRAVE)
local b2=(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false))
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=1191
opval[off]=0
off=off+1
end
if b2 then
ops[off]=1152
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
elseif sel==1 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return e:GetHandler():IsPreviousControler(tp) and rp~=tp
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.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)>0 then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,6,nil)
local tc=g:GetFirst()
local sg=Group.CreateGroup()
if #g>0 then
Duel.HintSelection(g)
while tc do
Duel.GetControl(tc,tp)
if tc:IsControler(1-tp) then sg:AddCard(tc) end
tc=g:GetNext()
end
Duel.SendtoGrave(sg,REASON_EFFECT)
end
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)
c:EnableReviveLimit()
aux.AddCodeList(c,12866620) aux.AddCodeList(c,12866620)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -32,7 +31,7 @@ function s.initial_effect(c) ...@@ -32,7 +31,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--SpecialSummon --SpecialSummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,id+1) e4:SetCountLimit(1,id+1)
...@@ -58,7 +57,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +57,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)>0 then if Duel.Destroy(tc,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if not c:IsLocation(LOCATION_ONFIELD) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
--血之恶魔 --血之恶魔
local s,id,o=GetID() function c12866610.initial_effect(c)
function s.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(c12866610.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetCode(EVENT_PREDRAW) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetRange(LOCATION_HAND)
e1:SetRange(0xff) e1:SetCountLimit(1,12866610)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCost(c12866610.spcost)
e1:SetOperation(s.op) e1:SetTarget(c12866610.sptg)
e1:SetOperation(c12866610.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
--summon reg
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c12866610.regop)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,12866611)
e4:SetCondition(c12866610.tgcon)
e4:SetTarget(c12866610.tgtg)
e4:SetOperation(c12866610.tgop)
c:RegisterEffect(e4)
end end
function s.op(e,tp) function c12866610.splimit(e,se,sp,st)
Debug.Message("这张卡的lua还没有完成") return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c12866610.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1800) end
Duel.PayLPCost(tp,1800)
end
function c12866610.spfilter(c,e,tp)
return c:IsSetCard(0x9a7c) and not c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12866610.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c12866610.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
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)
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()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c12866610.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(12866610,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c12866610.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetFlagEffect(12866610)~=0
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
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,rc,1,0,0)
end
function c12866610.tgop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
if rc:IsRelateToEffect(re) and Duel.SendtoGrave(rc,REASON_EFFECT)~=0 and not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and Duel.IsChainNegatable(ev) and Duel.SelectYesNo(tp,aux.Stringid(12866610,2)) then
Duel.NegateActivation(ev)
end
end end
--对魔特异4课 早川秋 --对魔特异4课 早川秋
local s,id,o=GetID() function c12866615.initial_effect(c)
function s.initial_effect(c) --set
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EVENT_PREDRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(0xff) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCountLimit(1,12866615)
e1:SetOperation(s.op) e1:SetTarget(c12866615.eqtg)
e1:SetOperation(c12866615.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--select
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,12866616)
e3:SetCondition(c12866615.condition1)
e3:SetCost(c12866615.cost)
e3:SetTarget(c12866615.target)
e3:SetOperation(c12866615.operation)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCondition(c12866615.condition2)
c:RegisterEffect(e4)
end end
function s.op(e,tp) function c12866615.eqfilter(c,tp)
Debug.Message("这张卡的lua还没有完成") return c:IsRace(RACE_FIEND) and not c:IsSummonableCard() and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c12866615.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c12866615.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c12866615.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c12866615.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,tp):GetFirst()
if not Duel.Equip(tp,tc,c) then return end
--level up
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_LEVEL)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e0:SetValue(tc:GetLevel())
c:RegisterEffect(e0)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c12866615.eqlimit)
tc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1800)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c12866615.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c12866615.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsHasEffect(12866650)
end
function c12866615.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsHasEffect(12866650)
end
function c12866615.spfilter(c,e,tp,code)
return c:IsRace(RACE_FIEND) and not (c:IsSummonableCard() or c:IsCode(code))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12866615.thfilter(c,lv)
return c:IsRace(RACE_FIEND) and not c:IsSummonableCard() and c:IsLevel(lv) and c:IsAbleToHand()
end
function c12866615.costfilter(c,e,tp,rc)
return c:IsControler(tp) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost() and
Duel.IsExistingMatchingCard(c12866615.thfilter,tp,LOCATION_DECK,0,1,nil,rc:GetLevel()) or (
Duel.IsExistingMatchingCard(c12866615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) and
Duel.GetMZoneCount(tp)>0)
end
function c12866615.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetEquipGroup():IsExists(c12866615.costfilter,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=c:GetEquipGroup():FilterSelect(tp,c12866615.costfilter,1,1,nil,e,tp,c)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c12866615.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,LOCATION_DECK)
end
function c12866615.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c12866615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,tc:GetCode()) and Duel.GetMZoneCount(tp)>0
local b2=Duel.IsExistingMatchingCard(c12866615.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel())
if not (b1 or b2) then return end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(12866615,1)},
{b2,aux.Stringid(12866615,2)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c12866615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode())
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c12866615.thfilter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end end
...@@ -70,6 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,6 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:CompleteProcedure()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -73,9 +73,32 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,9 +73,32 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(s.tgcon)
e1:SetOperation(s.tgop)
Duel.RegisterEffect(e1,tp)
end end
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT)
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp) function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)<Duel.GetLP(1-tp) return Duel.GetLP(tp)<Duel.GetLP(1-tp)
......
--未来恶魔 --未来恶魔
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PREDRAW) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(0xff) e1:SetValue(s.splimit)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--reveal
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.cftg)
e2:SetOperation(s.cfop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.adval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,id+1)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end end
function s.op(e,tp) function s.splimit(e,se,sp,st)
Debug.Message("这张卡的lua还没有完成") return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,1,nil) end
end
function s.cffilter(c)
return c:IsLocation(LOCATION_HAND)
end
function s.cfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local c=e:GetHandler()
if g:GetCount()>0 then
local cg=g:Filter(s.cffilter,nil)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleHand(1-tp)
if not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil)
end
end
end
function s.adval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*1000
end
function s.thfilter(c)
return c:IsSetCard(0x9a7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
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)
--splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PREDRAW) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(0xff) e1:SetValue(s.splimit)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip
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)
c:RegisterEffect(e2)
end end
function s.op(e,tp) function s.splimit(e,se,sp,st)
Debug.Message("这张卡的lua还没有完成") return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c9911426.rcfilter(c)
return c:IsFaceupEx() and c:GetAttack()>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)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
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
aux.AddXyzProcedure(c,nil,9,2)
c:EnableReviveLimit()
--atkchange
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,0))
e1:SetCode(EVENT_PREDRAW) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(0xff) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(s.op) e1:SetCountLimit(1,id)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(1190)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.thcost)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+2)
e3:SetCondition(s.damcon)
e3:SetTarget(s.damtg)
e3:SetOperation(s.damop)
c:RegisterEffect(e3)
end end
function s.op(e,tp) function s.filter(c)
Debug.Message("这张卡的lua还没有完成") return c:IsFaceup() and c:GetAttack()>0
end
function s.filter1(c)
return c:IsFaceup() and aux.NegateEffectMonsterFilter(c)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local og=Duel.GetOperatedGroup():Filter(s.filter1,nil,e,tp)
if not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and #og>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
local tc=og:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=og:GetNext()
end
end
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return not c:IsSummonableCard() and c:IsRace(RACE_FIEND) and c:IsAbleToHand() and c:IsFaceupEx()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and re:IsActiveType(TYPE_MONSTER)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
local atk=rc:GetBaseAttack()
if chk==0 then return atk>0 and e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local atk=rc:GetBaseAttack()
if Duel.Damage(1-tp,atk,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
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)
--splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PREDRAW) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(0xff) e1:SetValue(s.splimit)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetOperation(s.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_HAND)
e5:SetCountLimit(1,id)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(s.tgcon)
e5:SetTarget(s.tgtg)
e5:SetOperation(s.tgop)
c:RegisterEffect(e5)
end end
function s.op(e,tp) function s.splimit(e,se,sp,st)
Debug.Message("这张卡的lua还没有完成") return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.filter(c,e,tp)
return not (c:IsSummonableCard() or c:IsAttribute(ATTRIBUTE_LIGHT)) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
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.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-tc:GetBaseAttack())
end
end
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end end
\ No newline at end of file
--狐狸恶魔 --狐狸恶魔
local s,id,o=GetID() function c12866650.initial_effect(c)
function s.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(c12866650.splimit)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_PREDRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(0xff) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCountLimit(1,12866650)
e1:SetOperation(s.op) e1:SetTarget(c12866650.rmtg)
e1:SetOperation(c12866650.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--babel
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(12866650)
e2:SetCondition(c12866650.eqcon)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,12866651)
e3:SetTarget(c12866650.thtg)
e3:SetOperation(c12866650.thop)
c:RegisterEffect(e3)
end end
function s.op(e,tp) function c12866650.splimit(e,se,sp,st)
Debug.Message("这张卡的lua还没有完成") return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c12866650.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c12866650.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c12866650.eqcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsOriginalCodeRule(12866615)
end
function c12866650.cfilter(c,tp)
return c:IsSetCard(0x9a7c) and c:IsFaceup()
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()
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
if chk==0 then return Duel.IsExistingTarget(c12866650.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c12866650.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c12866650.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c12866650.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end end
--早川家 --早川家
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,12866610,12866615,12866620)
--Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCode(EVENT_PREDRAW) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(0xff) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetTarget(s.thtg)
e1:SetOperation(s.op) e1:SetOperation(s.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.op(e,tp) function s.thfilter(c)
Debug.Message("这张卡的lua还没有完成") return (c:IsCode(12866610) or c:IsCode(12866615) or c:IsCode(12866620)) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:RandomSelect(1-tp,1)
Duel.ShuffleDeck(tp)
tg:GetFirst():SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end end
--恶魔变身 --恶魔变身
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_PREDRAW) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(0xff) e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCost(s.spcost)
e1:SetOperation(s.op) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end end
function s.op(e,tp) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Debug.Message("这张卡的lua还没有完成") e:SetLabel(100)
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)
and Duel.GetMZoneCount(tp,c)>0
end
function s.spfilter(c,tc,e,tp)
return not c:IsSummonableCard() and c:GetOriginalCodeRule()~=tc:GetOriginalCodeRule()
and c:IsRace(RACE_FIEND)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp)
end
e:SetLabel(0)
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=e:GetLabelObject()
local num=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.thfilter(c)
return c:IsSetCard(0x9a7c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
\ No newline at end of file
...@@ -61,9 +61,9 @@ function s.Unification_Vector_Fusion_Condition() ...@@ -61,9 +61,9 @@ function s.Unification_Vector_Fusion_Condition()
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
if gc then if gc then
if not g:IsContains(gc) then return false end if not g:IsContains(gc) then return false end
return g:CheckSubGroup(s.Unification_Vector_Fusion_Gcheck,2,99,fc,tp,chkf,gc) return g:Filter(Card.IsFusionType,nil,TYPE_MONSTER):CheckSubGroup(s.Unification_Vector_Fusion_Gcheck,2,99,fc,tp,chkf,gc)
end end
return g:CheckSubGroup(s.Unification_Vector_Fusion_Gcheck,2,99,fc,tp,chkf,nil) return g:Filter(Card.IsFusionType,nil,TYPE_MONSTER):CheckSubGroup(s.Unification_Vector_Fusion_Gcheck,2,99,fc,tp,chkf,nil)
end end
end end
function s.Unification_Vector_Fusion_Operation() function s.Unification_Vector_Fusion_Operation()
...@@ -73,7 +73,7 @@ function s.Unification_Vector_Fusion_Operation() ...@@ -73,7 +73,7 @@ function s.Unification_Vector_Fusion_Operation()
if not gc then if not gc then
gc=nil gc=nil
end end
local g=eg:Clone() local g=eg:Filter(Card.IsFusionType,nil,TYPE_MONSTER)
local sg=g:SelectSubGroup(tp,s.Unification_Vector_Fusion_Gcheck,false,2,99,fc,tp,chkf,gc) local sg=g:SelectSubGroup(tp,s.Unification_Vector_Fusion_Gcheck,false,2,99,fc,tp,chkf,gc)
Duel.SetFusionMaterial(sg) Duel.SetFusionMaterial(sg)
end end
......
...@@ -21,7 +21,7 @@ function c91060011.initial_effect(c) ...@@ -21,7 +21,7 @@ function c91060011.initial_effect(c)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(91020022,2)) e6:SetDescription(aux.Stringid(91020022,2))
e6:SetType(EFFECT_TYPE_QUICK_O) e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING) e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE) e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m+1) e6:SetCountLimit(1,m+1)
e6:SetCost(aux.bfgcost) e6:SetCost(aux.bfgcost)
......
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