Advertisement
Yamian

c999999991.lua (YGOPRO-Great Moth)

Jun 2nd, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.30 KB | None | 0 0
  1. --Great Moth
  2. --COPYRIGHT by Yami An
  3. function c999999991.initial_effect(c)
  4.     c:EnableReviveLimit()
  5.     --Special summon 1
  6.     local e1=Effect.CreateEffect(c)
  7.     e1:SetType(EFFECT_TYPE_FIELD)
  8.     e1:SetCode(EFFECT_SPSUMMON_PROC)
  9.     e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  10.     e1:SetRange(LOCATION_HAND+LOCATION_DECK)
  11.     e1:SetCondition(c999999991.spcon1)
  12.     e1:SetOperation(c999999991.spop1)
  13.     c:RegisterEffect(e1)
  14.     --Special summon 2
  15.     local e2=Effect.CreateEffect(c)
  16.     e2:SetType(EFFECT_TYPE_FIELD)
  17.     e2:SetCode(EFFECT_SPSUMMON_PROC)
  18.     e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  19.     e2:SetRange(LOCATION_HAND+LOCATION_DECK)
  20.     e2:SetCondition(c999999991.spcon2)
  21.     e2:SetOperation(c999999991.spop2)
  22.     c:RegisterEffect(e2)
  23.     --Close 500 ATK
  24.     local e3=Effect.CreateEffect(c)
  25.     e3:SetType(EFFECT_TYPE_FIELD)
  26.     e3:SetCode(EFFECT_SET_ATTACK_FINAL)
  27.     e3:SetRange(LOCATION_MZONE)
  28.     e3:SetTargetRange(0,LOCATION_MZONE)
  29.     e3:SetProperty(EFFECT_FLAG_REPEAT)
  30.     e3:SetTarget(c999999991.feartg)
  31.     e3:SetValue(c999999991.fearatkval)
  32.     c:RegisterEffect(e3)
  33. end
  34. function c999999991.eqfilter1(c)
  35.     return c:IsCode(40240595) and c:GetTurnCounter()>=4
  36. end
  37. function c999999991.rfilter1(c)
  38.     return c:IsCode(58192742) and c:GetEquipGroup():IsExists(c999999991.eqfilter1,1,nil)
  39. end
  40. function c999999991.spcon1(e,c)
  41.     if c==nil then return true end
  42.     return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(c:GetControler(),c999999991.rfilter1,1,nil)
  43. end
  44. function c999999991.spop1(e,tp,eg,ep,ev,re,r,rp,c)
  45.     local g=Duel.SelectReleaseGroup(c:GetControler(),c999999991.rfilter1,1,1,nil)
  46.     Duel.Release(g,REASON_COST)
  47. end
  48. function c999999991.eqfilter2(c)
  49.     return c:IsCode(40240595) and c:GetTurnCounter()>=3
  50. end
  51. function c999999991.rfilter2(c)
  52.     return c:IsCode(87756343) and c:GetEquipGroup():IsExists(c999999991.eqfilter2,1,nil)
  53. end
  54. function c999999991.spcon2(e,c)
  55.     if c==nil then return true end
  56.     return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(c:GetControler(),c999999991.rfilter2,1,nil)
  57. end
  58. function c999999991.spop2(e,tp,eg,ep,ev,re,r,rp,c)
  59.     local g=Duel.SelectReleaseGroup(c:GetControler(),c999999991.rfilter2,1,1,nil)
  60.     Duel.Release(g,REASON_COST)
  61. end
  62. function c999999991.feartg(e,c)
  63.     return c~=e:GetHandler()
  64. end
  65. function c999999991.fearatkval(e,c)
  66.     return c:GetAttack()-500
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement