Commit ce739a6f authored by 聖園ミカ's avatar 聖園ミカ 🐟

hop

parent 5e40530b
...@@ -22,11 +22,22 @@ function s.initial_effect(c) ...@@ -22,11 +22,22 @@ function s.initial_effect(c)
e2:SetTarget(s.pentg2) e2:SetTarget(s.pentg2)
e2:SetOperation(s.penop2) e2:SetOperation(s.penop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.counterfilter2)
end
function s.counterfilter(c)
return c:GetBaseAttack()==c:GetBaseDefense()
end
function s.counterfilter2(re,tp,cid)
local rc=re:GetHandler()
return not re:IsActiveType(TYPE_MONSTER) or rc:GetBaseAttack()==rc:GetBaseDefense()
end end
--通用自肃2(附带不能特招) --通用自肃2(附带不能特招)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SUMMON)==0
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -37,11 +48,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,11 +48,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTarget(s.sumlimit)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTarget(s.sumlimit)
Duel.RegisterEffect(e3,tp)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not(re:GetHandler():GetBaseAttack()==re:GetHandler():GetBaseDefense()) return re:IsActiveType(TYPE_MONSTER) and not(re:GetHandler():GetBaseAttack()==re:GetHandler():GetBaseDefense())
end end
function s.sumlimit(e,c)
return not c:GetBaseAttack()==c:GetBaseDefense()
end
function s.setfilter1(c) function s.setfilter1(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_EARTH) return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_EARTH)
end end
......
...@@ -22,7 +22,16 @@ function s.initial_effect(c) ...@@ -22,7 +22,16 @@ function s.initial_effect(c)
e2:SetTarget(s.pentg2) e2:SetTarget(s.pentg2)
e2:SetOperation(s.penop2) e2:SetOperation(s.penop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.counterfilter2)
end
function s.counterfilter(c)
return c:GetBaseAttack()==c:GetBaseDefense()
end
function s.counterfilter2(re,tp,cid)
local rc=re:GetHandler()
return not re:IsActiveType(TYPE_MONSTER) or rc:GetBaseAttack()==rc:GetBaseDefense()
end end
--通用自肃2(附带不能特招) --通用自肃2(附带不能特招)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -37,11 +46,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,11 +46,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTarget(s.sumlimit)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTarget(s.sumlimit)
Duel.RegisterEffect(e3,tp)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not(re:GetHandler():GetBaseAttack()==re:GetHandler():GetBaseDefense()) return re:IsActiveType(TYPE_MONSTER) and not(re:GetHandler():GetBaseAttack()==re:GetHandler():GetBaseDefense())
end end
function s.sumlimit(e,c)
return not c:GetBaseAttack()==c:GetBaseDefense()
end
function s.setfilter1(c) function s.setfilter1(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_WATER) return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_WATER)
end end
......
...@@ -233,7 +233,7 @@ end ...@@ -233,7 +233,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not Card.IsCanBeSpecialSummoned(c,e,0,tp,false,false) and Duel.IsCanRemoveCounter(tp,1,0,0x760,5,REASON_EFFECT) then return end if not Card.IsCanBeSpecialSummoned(c,e,0,tp,false,false) and Duel.IsCanRemoveCounter(tp,1,0,0x760,5,REASON_EFFECT) then return end
if not Duel.RemoveCounter(tp,1,0,0x760,5,REASON_EFFECT)then return end if not Duel.RemoveCounter(tp,1,0,0x760,5,REASON_EFFECT)then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x760,e,REASON_EFFECT,tp,tp,count) Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x760,e,REASON_EFFECT,tp,tp,count)
local ct=Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil) local ct=Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)
...@@ -245,12 +245,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -245,12 +245,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_DECK,0,1,1,nil)
if not g then return end if not g then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.SendtoExtraP(g,nil,REASON_EFFECT)
elseif reg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0) then elseif reg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tgfilter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter1,tp,LOCATION_DECK,0,1,1,nil)
if not g then return end if not g then return end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoHand(g,tp,REASON_EFFECT)
end end
end end
end end
...@@ -263,6 +263,12 @@ end ...@@ -263,6 +263,12 @@ end
function s.tgfilter2(c) function s.tgfilter2(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToExtra() return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToExtra()
end end
function s.tgfilter3(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove()
end
function s.tgfilter4(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and (c:IsAbleToRemove() or c:IsAbleToExtra())
end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
...@@ -275,22 +281,22 @@ function s.thfilter(c) ...@@ -275,22 +281,22 @@ function s.thfilter(c)
return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() return c:IsCanHaveCounter(0x760) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tgfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter4,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE+CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE+CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local geg = Duel.GetMatchingGroup(s.tgfilter1,tp,LOCATION_DECK,0,nil) local geg = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tgfilter3),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local reg = Duel.GetMatchingGroup(s.tgfilter2,tp,LOCATION_DECK,0,nil) local reg = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tgfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if geg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0 and Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==1) then if geg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0 and Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==1) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tgfilter2),tp,LOCATION_DECK,0,1,1,nil)
if not g then return end if not g then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.SendtoExtraP(g,nil,REASON_EFFECT)
elseif reg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0) then elseif reg:GetCount() <=0 or ((geg:GetCount() * reg:GetCount())>0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tgfilter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tgfilter3),tp,LOCATION_DECK,0,1,1,nil)
if not g then return end if not g then return end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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