Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Ojama Rainbow
- function c10808859.initial_effect(c)
- c:EnableReviveLimit()
- --special summon
- local e1=Effect.CreateEffect(c)
- e1:SetType(EFFECT_TYPE_FIELD)
- e1:SetCode(EFFECT_SPSUMMON_PROC)
- e1:SetRange(LOCATION_HAND)
- e1:SetCondition(c10808859.spcon)
- e1:SetOperation(c10808859.spop)
- c:RegisterEffect(e1)
- --spsummon condition
- local e2=Effect.CreateEffect(c)
- e2:SetCode(EFFECT_CANNOT_SUMMON)
- e2:SetCode(EFFECT_CANNOT_MSET)
- e2:SetType(EFFECT_TYPE_SINGLE)
- e2:SetCode(EFFECT_SPSUMMON_CONDITION)
- c:RegisterEffect(e2)
- --ojama country
- local e3=Effect.CreateEffect(c)
- e3:SetDescription(aux.Stringid(10808859,0))
- e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
- e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
- e3:SetCode(EVENT_SPSUMMON_SUCCESS)
- e3:SetRange(LOCATION_MZONE)
- e3:SetTarget(c10808859.target)
- e3:SetOperation(c10808859.operation)
- c:RegisterEffect(e3)
- --redirect
- local e4=Effect.CreateEffect(c)
- e4:SetType(EFFECT_TYPE_SINGLE)
- e4:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
- e4:SetCondition(c10808859.recon)
- e4:SetValue(LOCATION_REMOVED)
- c:RegisterEffect(e4)
- --Attack twice first turn
- local e5=Effect.CreateEffect(c)
- e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
- e5:SetCode(EVENT_SPSUMMON_SUCCESS)
- e5:SetCondition (c10808859.condition)
- e5:SetOperation(c10808859.atklimit)
- c:RegisterEffect(e5)
- end
- --This makes the monsters used not able to be copied versions or using their name.
- function c10808859.spfilter(c,code)
- return c:GetOriginalCode()==code
- end
- --This makes the tributes have to be All 5 Ojamas.
- function c10808859.spcon(e,c)
- if c==nil then return true end
- local tp=c:GetControler()
- return Duel.GetLocationCount(tp,LOCATION_MZONE)>-5
- and Duel.CheckReleaseGroup(tp,c10808859.spfilter,1,nil,42941100)
- and Duel.CheckReleaseGroup(tp,c10808859.spfilter,1,nil,79335209)
- and Duel.CheckReleaseGroup(tp,c10808859.spfilter,1,nil,12482652)
- and Duel.CheckReleaseGroup(tp,c10808859.spfilter,1,nil,37132349)
- and Duel.CheckReleaseGroup(tp,c10808859.spfilter,1,nil,64627453)
- end
- --This sends the tributes to the graveyard.
- function c10808859.spop(e,tp,eg,ep,ev,re,r,rp,c)
- local g1=Duel.SelectReleaseGroup(tp,c10808859.spfilter,1,1,nil,42941100)
- local g2=Duel.SelectReleaseGroup(tp,c10808859.spfilter,1,1,nil,79335209)
- local g3=Duel.SelectReleaseGroup(tp,c10808859.spfilter,1,1,nil,12482652)
- local g4=Duel.SelectReleaseGroup(tp,c10808859.spfilter,1,1,nil,37132349)
- local g5=Duel.SelectReleaseGroup(tp,c10808859.spfilter,1,1,nil,64627453)
- g1:Merge(g2)
- g1:Merge(g3)
- g1:Merge(g4)
- g1:Merge(g5)
- Duel.Release(g1,REASON_COST)
- end
- --makes the card searched only Ojama Country.
- function c10808859.filter(c)
- return c:IsCode(90011152) and c:IsAbleToHand()
- end
- --makes the card searched from the Grave or Deck.
- function c10808859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
- if chk==0 then return Duel.IsExistingMatchingCard(c10808859.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
- Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
- end
- --makes the found card get sent to hand.
- function c10808859.operation(e,tp,eg,ep,ev,re,r,rp)
- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
- local g=Duel.SelectMatchingCard(tp,c10808859.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
- if g:GetCount()>0 then end
- Duel.SendtoHand(g,nil,REASON_EFFECT)
- Duel.ConfirmCards(1-tp,g)
- end
- --makes only attack once
- function c10808859.atklimit(e,tp,eg,ep,ev,re,r,rp)
- local e1=Effect.CreateEffect(e:GetHandler())
- e1:SetType(EFFECT_TYPE_SINGLE)
- e1:SetCode(EFFECT_EXTRA_ATTACK)
- e1:SetValue(1)
- e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
- e:GetHandler():RegisterEffect(e1)
- end
- --makes this card be banished when it leaves the field
- function c10808859.recon(e)
- return e:GetHandler():IsFaceup()
- end
- --makes it only work when you have less LP
- function c10808859.condition(e,tp,eg,ep,ev,re,r,rp)
- return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-1
- end
Advertisement
Add Comment
Please, Sign In to add comment