Commit a5563377 authored by Tachibana's avatar Tachibana

eme

parent 3d31f6e8
Pipeline #9197 passed with stages
in 30 minutes and 11 seconds
...@@ -99,7 +99,7 @@ function cm.setcon(e,c,minc) ...@@ -99,7 +99,7 @@ function cm.setcon(e,c,minc)
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_WIND) and Duel.IsChainNegatable(ev) then if re:IsActiveType(TYPE_MONSTER) and not rc:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_WIND) and Duel.IsChainDisablable(ev) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
\ No newline at end of file
...@@ -37,20 +37,20 @@ function cm.initial_effect(c) ...@@ -37,20 +37,20 @@ function cm.initial_effect(c)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.desfilter(c,e,tp) function cm.desfilter(c,tp)
return c:IsControler(tp) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return eg:IsExists(cm.desfilter,1,nil,tp) and Duel.CheckLPCost(tp,1000) end
local g=c:GetLinkedGroup()
if chk==0 then return g:IsExists(cm.desfilter,1,nil,e,tp) and Duel.CheckLPCost(tp,1000) end
return Duel.SelectYesNo(tp,aux.Stringid(m,0)) return Duel.SelectYesNo(tp,aux.Stringid(m,0))
end end
function cm.desrepval(e,c) function cm.desrepval(e,c)
return cm.desfilter(c,e,e:GetHandlerPlayer()) return cm.desfilter(c,e:GetHandlerPlayer())
end end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp) function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
Duel.Hint(HINT_CARD,0,m)
end end
function cm.sumfilter(c) function cm.sumfilter(c)
return c:IsRace(RACE_PLANT) and c:IsLevelAbove(5) and c:IsSummonable(true,nil) return c:IsRace(RACE_PLANT) and c:IsLevelAbove(5) and c:IsSummonable(true,nil)
......
...@@ -57,7 +57,7 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not tc:IsRelateToEffect(e) and not e:GetHandler():IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) and not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and (tc:IsSetCard(0xafac) or tc:IsRace(RACE_PLANT)) then if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and (tc:IsSetCard(0xafac) or tc:IsRace(RACE_PLANT)) then
Duel.Recover(tp,500,REASON_EFFECT) Duel.Recover(tp,500,REASON_EFFECT)
end end
end end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp) function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -68,12 +68,12 @@ function cm.filter(c,e,tp) ...@@ -68,12 +68,12 @@ function cm.filter(c,e,tp)
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE+LOCATION_HAND)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -29,18 +29,33 @@ function cm.Mayumi(c) ...@@ -29,18 +29,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.filter(c) function cm.thfilter(c)
return c:IsCode(81011107) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c,e,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsType(TYPE_PENDULUM) return c:IsAttack(1550) and c:IsDefense(1050) and c:IsType(TYPE_PENDULUM)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER) local mg=Duel.GetRitualMaterialEx(tp)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg,nil,Card.GetAttack,"Greater") return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg,nil,Card.GetAttack,"Greater")
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER) local mg=Duel.GetRitualMaterialEx(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg,nil,Card.GetAttack,"Greater") local tg=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg,nil,Card.GetAttack,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
...@@ -77,20 +92,20 @@ function cm.RitualCheckEqual(g,c,atk) ...@@ -77,20 +92,20 @@ function cm.RitualCheckEqual(g,c,atk)
end end
function cm.RitualCheck(g,tp,c,atk,greater_or_equal) function cm.RitualCheck(g,tp,c,atk,greater_or_equal)
return cm["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp)) return cm["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c)) and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end end
function cm.RitualCheckAdditional(c,atk,greater_or_equal) function cm.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then if greater_or_equal=="Equal" then
return function(g) return function(g)
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g)) and g:GetSum(Card.GetAttack)<=atk return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(Card.GetAttack)<=atk
end end
else else
return function(g,ec) return function(g,ec)
if atk==0 then return #g<=1 end if atk==0 then return #g<=1 end
if ec then if ec then
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g,ec)) and g:GetSum(Card.GetAttack)-Card.GetAttack(ec)<=atk return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(Card.GetAttack)-Card.GetAttack(ec)<=atk
else else
return not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g) return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end end
end end
end end
...@@ -107,23 +122,8 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_ ...@@ -107,23 +122,8 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_
mg:RemoveCard(c) mg:RemoveCard(c)
end end
local atk=attack_function(c) local atk=attack_function(c)
Auxiliary.GCheckAdditional=cm.RitualCheckAdditional(c,atk,greater_or_equal) aux.GCheckAdditional=cm.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(cm.RitualCheck,1,#mg,tp,c,atk,greater_or_equal) local res=mg:CheckSubGroup(cm.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
Auxiliary.GCheckAdditional=nil aux.GCheckAdditional=nil
return res return res
end end
function cm.thfilter(c)
return c:IsCode(81011107) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
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