游戏王ygocore吧 关注:243,702贴子:2,900,500
  • 5回复贴,共1

【一般讨论】新手编写效果遇到瓶颈,想还原动画版的极星天女武神

只看楼主收藏回复

极星天 女武神
这张卡召唤成功时,把2张手卡送去墓地才能发动。在自己场上把2只「英灵衍生物」(战士族·地·4星·攻/守1000)守备表示特殊召唤。
--极星天 女武神 (动漫)
function c511000251.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(511000251,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c511000251.condition)
e1:SetCost(c511000251.cost)
e1:SetTarget(c511000251.target)
e1:SetOperation(c511000251.operation)
c:RegisterEffect(e1)
end
function c511000251.cfilter(c)
return c:IsAbleToDISCARDAsCost()
end
function c511000251.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c511000251.cfilter,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c511000251.cfilter,tp,LOCATION_HAND,0,2,2,nil)
Duel.DISCARD(g,POS_FACEUP,REASON_COST)
end
function c511000251.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c511000251.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,40844553)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
Duel.SpecialSummonComplete()
end


IP属地:广东1楼2014-11-06 22:34回复
    要怎么改啊!


    IP属地:广东2楼2014-11-06 22:34
    回复
      --极星天 女武神 (动漫)
      function c511000251.initial_effect(c)
      --token
      local e1=Effect.CreateEffect(c)
      e1:SetDescription(aux.Stringid(511000251,0))
      e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
      e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
      e1:SetCode(EVENT_SUMMON_SUCCESS)
      e1:SetCost(c511000251.cost)
      e1:SetTarget(c511000251.target)
      e1:SetOperation(c511000251.operation)
      c:RegisterEffect(e1)
      end
      function c511000251.cost(e,tp,eg,ep,ev,re,r,rp,chk)
      if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
      local g=Duel.SelectMatchingCard(tp,c511000251.cfilter,tp,LOCATION_HAND,0,2,2,nil)
      Duel.SendtoGrave(g,POS_FACEUP,REASON_COST)
      end
      function c511000251.target(e,tp,eg,ep,ev,re,r,rp,chk)
      if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
      and Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) end
      Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
      end
      function c511000251.operation(e,tp,eg,ep,ev,re,r,rp)
      if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
      if not Duel.IsPlayerCanSpecialSummonMonster(tp,40844553,0,0x4011,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
      for i=1,2 do
      local token=Duel.CreateToken(tp,40844553)
      Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
      end
      Duel.SpecialSummonComplete()
      end


      IP属地:浙江3楼2014-11-07 11:58
      收起回复
        那动画卡的脚本早就有了,你怎么骑马找马


        IP属地:广东4楼2014-11-07 12:00
        收起回复