Commit 95676242 authored by mercury233's avatar mercury233

fix

parent 7e80fa74
...@@ -44,18 +44,19 @@ function c101012025.chainfilter(re,tp,cid) ...@@ -44,18 +44,19 @@ function c101012025.chainfilter(re,tp,cid)
return not (re:GetHandler():IsRace(RACE_THUNDER) and re:IsActiveType(TYPE_MONSTER) return not (re:GetHandler():IsRace(RACE_THUNDER) and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND) and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)
end end
function c101012025.spfilter(c) function c101012025.spfilter(c,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsLevelBelow(8) and c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsLevelBelow(8) and c:IsRace(RACE_THUNDER)
and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end end
function c101012025.spcon(e,c) function c101012025.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return (Duel.GetCustomActivityCount(101012025,tp,ACTIVITY_CHAIN)~=0 return (Duel.GetCustomActivityCount(101012025,tp,ACTIVITY_CHAIN)~=0
or Duel.GetCustomActivityCount(101012025,1-tp,ACTIVITY_CHAIN)~=0) or Duel.GetCustomActivityCount(101012025,1-tp,ACTIVITY_CHAIN)~=0)
and Duel.IsExistingMatchingCard(c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,tp)
end end
function c101012025.spop(e,tp,eg,ep,ev,re,r,rp,c) function c101012025.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c101012025.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101012025.etcon(e,tp,eg,ep,ev,re,r,rp) function c101012025.etcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,6 +32,9 @@ function c101012030.initial_effect(c) ...@@ -32,6 +32,9 @@ function c101012030.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101012030.rfilter(c,tp)
return c:IsLevelAbove(1) and (c:IsControler(tp) or c:IsFaceup())
end
function c101012030.fselect(g,tp) function c101012030.fselect(g,tp)
Duel.SetSelectedCard(g) Duel.SetSelectedCard(g)
if Duel.GetMZoneCount(tp,g)>0 and g:CheckWithSumGreater(Card.GetLevel,8) then if Duel.GetMZoneCount(tp,g)>0 and g:CheckWithSumGreater(Card.GetLevel,8) then
...@@ -40,7 +43,7 @@ function c101012030.fselect(g,tp) ...@@ -40,7 +43,7 @@ function c101012030.fselect(g,tp)
else return false end else return false end
end end
function c101012030.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101012030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp):Filter(Card.IsLevelAbove,nil,1) local g=Duel.GetReleaseGroup(tp):Filter(c101012030.rfilter,nil,tp)
if chk==0 then return g:CheckSubGroup(c101012030.fselect,1,g:GetCount(),tp) end if chk==0 then return g:CheckSubGroup(c101012030.fselect,1,g:GetCount(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g:SelectSubGroup(tp,c101012030.fselect,false,1,g:GetCount(),tp) local rg=g:SelectSubGroup(tp,c101012030.fselect,false,1,g:GetCount(),tp)
......
...@@ -21,7 +21,7 @@ function c101012031.initial_effect(c) ...@@ -21,7 +21,7 @@ function c101012031.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101012131) e2:SetCountLimit(1,101012131)
e2:SetTarget(c101012031.sptg2) e2:SetTarget(c101012031.sptg2)
e2:SetOperation(c101012031.spop2) e2:SetOperation(c101012031.spop2)
......
...@@ -48,13 +48,13 @@ end ...@@ -48,13 +48,13 @@ end
function c101012053.efilter(e,te) function c101012053.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
end end
function c101012053.rfilter(c) function c101012053.rfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) return c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
function c101012053.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c101012053.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101012053.rfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,c101012053.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101012053.rfilter,1,1,nil) local g=Duel.SelectReleaseGroup(tp,c101012053.rfilter,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLink()) e:SetLabel(g:GetFirst():GetLink())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
...@@ -17,7 +17,8 @@ function c101012072.filter(c) ...@@ -17,7 +17,8 @@ function c101012072.filter(c)
end end
function c101012072.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101012072.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,101012072) local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,101012072)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,ct+3) end local g=Duel.GetDecktopGroup(tp,ct+3)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,ct+3) and g:FilterCount(Card.IsAbleToHand,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101012072.activate(e,tp,eg,ep,ev,re,r,rp) function c101012072.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -39,15 +39,14 @@ function c101012080.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,15 +39,14 @@ function c101012080.activate(e,tp,eg,ep,ev,re,r,rp)
if res then if res then
if Duel.SendtoGrave(tc2,REASON_EFFECT)~=0 and tc2:IsLocation(LOCATION_GRAVE) if Duel.SendtoGrave(tc2,REASON_EFFECT)~=0 and tc2:IsLocation(LOCATION_GRAVE)
and tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) then and tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.GetLocationCountFromEx(tp,tp,nil,tc1)>0 then if Duel.GetLocationCountFromEx(tp,tp,nil,tc1)>0 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP) if tc1:GetOriginalRace()==tc2:GetOriginalRace() and tc1:GetOriginalAttribute()==tc2:GetOriginalAttribute() then
Duel.BreakEffect()
local atk=tc2:GetTextAttack()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-atk)
end
end end
end end
if tc1:GetOriginalRace()==tc2:GetOriginalRace() and tc1:GetOriginalAttribute()==tc2:GetOriginalAttribute() then
Duel.BreakEffect()
local atk=tc2:GetTextAttack()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-atk)
end
else else
if Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE) if Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE)
and tc2:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp) then and tc2:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp) 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