Commit 8a19663a authored by Tachibana's avatar Tachibana

watele

parent 6dfa9cde
No preview for this file type
......@@ -17,7 +17,8 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(cm.cost1)
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.drcon)
......@@ -61,7 +61,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if rk.check(tc,"FAIRY") then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil)
......
......@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_CONTROL+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCountLimit(1,m+100)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
......@@ -49,36 +49,37 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(cm.ctfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local g1=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,cm.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()~=2 then Duel.SendtoGrave(tc,REASON_EFFECT) return end
local tc=g:Filter(Card.IsControler,nil,tp)
local tc2=g:Filter(Card.IsControler,nil,1-tp)
if tg:GetCount()~=2 then return end
local tc=g:Filter(Card.IsControler,nil,tp):GetFirst()
local tc2=g:Filter(Card.IsControler,nil,1-tp):GetFirst()
if tc2:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if not Duel.Equip(tp,c,tc) then return end
if not Duel.Equip(tp,tc,tc2) 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:SetLabelObject(tc2)
e1:SetValue(cm.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_SET_CONTROL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetOwnerPlayer(tp)
e3:SetValue(cm.ctval)
c:RegisterEffect(e3)
tc:RegisterEffect(e3)
end
end
function cm.eqlimit(e,c)
......
......@@ -90,6 +90,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rgc=Duel.SelectMatchingCard(tp,cm.rmc,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
local tpe=rgc:GetType()&Extpe
Duel.Remove(rgc,POS_FACEUP,REASON_COST)
Duel.SetTargetParam(tpe)
end
function cm.operation(e,tp)
......
......@@ -33,7 +33,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.ccfilter(c,ft)
return (ft~=0 and c:IsRace(RACE_MACHINE)) or (ft==0 and c:GetSequence()<5)
return (ft~=0 or (ft==0 and c:GetSequence()<5)) and c:IsReleasable()
end
function cm.spcon(e,c)
if c==nil then return true end
......
......@@ -54,7 +54,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_EXTRA,LOCATION_ONFIELD,nil)
local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
if tg:GetCount()>0 then
......
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