Commit 1e547df4 authored by Nemo Ma's avatar Nemo Ma

fix

parent feac604b
......@@ -68,5 +68,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.con(e,c)
return Duel.GetActivityCount(e:GetControler(),ACTIVITY_BATTLE_PHASE)~=0
return Duel.GetActivityCount(e:GetOwnerPlayer(),ACTIVITY_BATTLE_PHASE)~=0
end
\ No newline at end of file
......@@ -7,9 +7,8 @@ function c25800009.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c25800009.srcon)
e3:SetTarget(c25800009.destg)
e3:SetOperation(c25800009.desop)
......
......@@ -58,6 +58,10 @@ function cm.remop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and rc:IsCanOverlay() and c:IsType(TYPE_XYZ) then
local og=rc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
rc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(rc))
end
......
......@@ -33,6 +33,7 @@ function c29001624.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c29001624.tgtg)
e4:SetValue(1)
c:RegisterEffect(e4)
......
......@@ -32,14 +32,15 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
Duel.ShuffleHand(tp)
if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x87af) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,1152) then
if tc:IsType(TYPE_MONSTER) and (tc:IsSetCard(0x87af) or (_G["c"..tc:GetCode()] and _G["c"..tc:GetCode()].named_with_Arknight)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
end
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc then return end
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -35,7 +35,8 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if #g>0 and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,1,#g,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
sg=sg:Select(tp,1,ft>#g and #g or ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
if c:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
......
......@@ -29,7 +29,7 @@ end
function c29065521.spcon(e,c,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return (Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 or Duel.IsExistingMatchingCard(c29065521.spfilter,tp,LOCATION_MZONE,0,1,nil)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingMatchingCard(c29065521.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c29065521.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x10ae,1) end
......
......@@ -31,7 +31,7 @@ end
function c29065523.spcon(e,c,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
local tp=c:GetControler()
return (Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 or Duel.IsExistingMatchingCard(c29065523.spfilter,tp,LOCATION_MZONE,0,1,nil)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingMatchingCard(c29065523.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c29065523.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -167,7 +167,7 @@ function cm.LinkCondition(f,minc,maxc,gf)
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
......@@ -194,7 +194,7 @@ function cm.LinkTarget(f,minc,maxc,gf)
if not aux.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
......
......@@ -20,8 +20,9 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon1)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
......
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