Commit 33f655fa authored by Nemo Ma's avatar Nemo Ma

fix

parent 3608b4c6
......@@ -16,12 +16,13 @@ function cm.gcheck(g,e,tp)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp,true)
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then
return e:GetLabel()==100 and rg:CheckSubGroup(cm.gcheck,1,#rg,e,tp)
return e:GetLabel()==100 and #rg>0 and #tg>0 --rg:CheckSubGroup(cm.gcheck,1,#rg,e,tp)
end
e:SetLabel(0)
rshint.Select(tp,"res")
local rg2=rg:SelectSubGroup(tp,cm.gcheck,false,1,#rg,e,tp)
local rg2=rg:Select(tp,1,#rg,nil) --rg:SelectSubGroup(tp,cm.gcheck,false,1,#rg,e,tp)
local ct=Duel.Release(rg2,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,ct,1-tp,LOCATION_ONFIELD)
e:SetValue(ct)
......
......@@ -39,6 +39,7 @@ function cm.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetCondition(cm.costcon)
e4:SetCost(cm.costchk)
e4:SetTarget(cm.costtg)
e4:SetOperation(cm.costop)
......@@ -97,7 +98,11 @@ function cm.eqlimit(e,c)
end
function cm.accon(e)
c15004386[0]=false
return true
return e:GetHandler():GetEquipCount()~=0
end
function cm.costcon(e)
c15004386[0]=false
return e:GetHandler():GetEquipCount()~=0
end
function cm.actarget(e,te,tp)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -39,7 +39,7 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(22348272,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c22348272.thcon)
......
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