Commit c5256349 authored by Amiya's avatar Amiya

Merge branch 'master' of git.mycard.moe:mycard/pre-release-database-cdb

parents f17748e2 dd6aaa8a
No preview for this file type
......@@ -19,13 +19,13 @@ function s.cfilter1(c)
return aux.IsCodeListed(c,79791878) and c:IsFaceup()
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
return tp~=Duel.GetTurnPlayer()
end
function s.filter(c)
return c:IsAttackPos()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......@@ -67,5 +67,5 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp)
if tp==ep then return false end
if not re:IsActiveType(TYPE_MONSTER) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(s.cfilter3,nil)-tg:GetCount()>0 and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
return ex and tg~=nil and tc+tg:FilterCount(s.cfilter3,nil)-tg:GetCount()>0
end
\ No newline at end of file
......@@ -33,9 +33,9 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=math.min(Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(s.filter,nil),Duel.GetLocationCount(tp,LOCATION_MZONE))
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and Card.IsControlerCanBeChanged(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_ONFIELD,1,nil) and ct>0 end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) and ct>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_ONFIELD,1,ct,nil)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -84,7 +84,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,tc):GetSum(Card.GetBaseAttack)
if atk>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if atk>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
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