Commit 5c84ea38 authored by TanakaKotoha's avatar TanakaKotoha

tnndx

parent 24e414ff
......@@ -42,7 +42,7 @@ function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -51,16 +51,16 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if true then
Duel.SendtoHand(re:GetHandler(),nil,REASON_EFFECT)
end
Duel.SendtoHand(re:GetHandler(),nil,REASON_EFFECT)
end
local sc=Duel.GetOperatedGroup()
if sc:GetCount()==0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.NegateActivation(ev)
else
if not sc:GetFirst():IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.NegateActivation(ev)
else
if not sc:GetFirst():IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.NegateActivation(ev)
end
end
end
end
end
\ No newline at end of file
......@@ -68,10 +68,10 @@ function c12031010.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
local gg=Duel.GetMatchingGroup(nil,tp,LOCATION_EXTRA,0,1,nil)
if gg:GetCount()>0 then
tc=gg:GetFirst()
local tg=gg:GetFirst()
Duel.ConfirmCards(1-tp,tc)
if not tc:IsSetCard(0xfa0) then return end
local code=tc:GetOriginalCode()
local code=tg:GetOriginalCode()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -44,12 +44,12 @@ function cm.rthfilter(c)
return c:IsSetCard(0x9fa9) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -48,7 +48,7 @@ function cm.initial_effect(c)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
c:RegisterEffect(e2)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,7 +33,7 @@ function cm.initial_effect(c)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
......@@ -43,7 +43,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x9fa9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9fa9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -2,10 +2,7 @@ if not pcall(function() require("expansions/script/c16101100") end) then require
local m=16199990
local Version_Number="1.0.0 beta"
rk={}
os=require('os')
table=require('table')
io=require('io')
-------------"name set"
-------------"name set"------------
function rk.set(code,setcode)
if not _G["c"..code] then _G["c"..code]={}
setmetatable(_G["c"..code],Card)
......
......@@ -51,6 +51,7 @@ function c16200005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c16200005.condition(e,tp)
return Duel.GetMatchingGroupCount(nil,tp,LOCATION_MZONE,0,nil)<Duel.GetMatchingGroupCount(nil,1-tp,LOCATION_MZONE,0,nil)
end
function c16200005.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
......
......@@ -143,7 +143,13 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) then
rc:CancelToGrave()
if re:IsActiveType(TYPE_SPELL) then
rc:CancelToGrave()
end
local og=rc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(rc))
end
end
......
......@@ -52,7 +52,7 @@ function c21520135.effectfilter(c)
return c:IsCode(21520133) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c21520135.thfilter(c)
return c:IsSetCard(0x491) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x491) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLevelBelow(4)
end
function c21520135.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c21520135.effectfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
......
......@@ -35,7 +35,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
......
......@@ -46,7 +46,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=c:GetLinkedZone(tp)
if zone~=0 and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp,zone)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP,zone)
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