Commit 96e6b30a authored by mercury233's avatar mercury233

update scripts

parent d1ad1373
......@@ -34,10 +34,10 @@ function c100241005.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100241005.cfilter,1,nil)
end
function c100241005.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500)
end
......
......@@ -33,14 +33,21 @@ end
function c100306003.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c100306003.exfilter(c,p)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup()
and c:IsControler(p) and c:IsHasEffect(EFFECT_EXTRA_RELEASE_NONSUM)
end
function c100306003.fselect(c,tp,rg,sg)
sg:AddCard(c)
local res=Duel.GetMZoneCount(tp,sg)>0 or rg:IsExists(c100306003.fselect,1,sg,tp,rg,sg)
local res=sg:FilterCount(c100306003.exfilter,nil,1-tp)<=1
and (Duel.GetMZoneCount(tp,sg)>0 or rg:IsExists(c100306003.fselect,1,sg,tp,rg,sg))
sg:RemoveCard(c)
return res
end
function c100306003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK)
local exg=Duel.GetMatchingGroup(c100306003.exfilter,tp,0,LOCATION_MZONE,nil,1-tp)
rg:Merge(exg)
local g=Group.CreateGroup()
if chk==0 then return Duel.GetCustomActivityCount(100306003,tp,ACTIVITY_SPSUMMON)==0
and rg:IsExists(c100306003.fselect,1,nil,tp,rg,g) end
......@@ -54,12 +61,16 @@ function c100306003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
while true do
local mg=rg:Filter(c100306003.fselect,g,tp,rg,g)
if mg:GetCount()==0 or (Duel.GetMZoneCount(tp,g)>0 and not Duel.SelectYesNo(tp,210)) then break end
if mg:GetCount()==0 or (g:GetCount()>0 and Duel.GetMZoneCount(tp,g)>0 and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=mg:Select(tp,1,1,nil)
g:Merge(sg)
end
e:SetLabel(g:GetCount())
if g:FilterCount(c100306003.exfilter,nil,1-tp)>=1 then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
fc:RegisterFlagEffect(100306122,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
Duel.Release(g,REASON_COST)
end
function c100306003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
......
--闇黒世界-シャドウ・ディストピア-
--Lair of Darkness
--Script by mercury233
--not fully implemented
function c100306022.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -18,8 +17,16 @@ function c100306022.initial_effect(c)
e2:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e2)
--release replace
--local e3=Effect.CreateEffect(c)
--c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_RELEASE_NONSUM)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK))
e3:SetCountLimit(1)
e3:SetCondition(c100306022.relcon)
e3:SetValue(c100306022.relval)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -37,6 +44,12 @@ function c100306022.initial_effect(c)
e5:SetOperation(c100306022.spop)
c:RegisterEffect(e5)
end
function c100306022.relcon(e)
return e:GetHandler():GetFlagEffect(100306122)==0
end
function c100306022.relval(e,re,r,rp)
return bit.band(r,REASON_COST)~=0
end
function c100306022.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetFlagEffectLabel(100306022)
......
......@@ -34,7 +34,7 @@ end
function c100408034.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -47,13 +47,6 @@ function c100408034.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 and tc:IsControlerCanBeChanged() and Duel.SelectYesNo(tp,aux.Stringid(100408034,0)) then
Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1)
......
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