--AoJ - L'Orchestratrice --Script by XGlitchy30 function c19772607.initial_effect(c) --link summon c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x197),2) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(19772607,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c19772607.spcon) e1:SetTarget(c19772607.sptg) e1:SetOperation(c19772607.spop) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(c19772607.atkval) c:RegisterEffect(e2) --change level local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(19772607,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,19772607) e3:SetCost(c19772607.drycost) e3:SetTarget(c19772607.drytg) e3:SetOperation(c19772607.dryop) c:RegisterEffect(e3) --coin flip local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(19772697,2)) e4:SetCategory(CATEGORY_COIN) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCountLimit(1) e4:SetCondition(c19772607.cncon) e4:SetTarget(c19772607.cntg) e4:SetOperation(c19772607.cnop) c:RegisterEffect(e4) end c19772607.toss_coin=true --filters function c19772607.spfilter(c,e,tp,zone) return c:IsSetCard(0x197) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function c19772607.rfilter(c) local def=c:GetDefense() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x197) and not c:IsCode(19772587) and not c:IsPublic() and Duel.IsExistingMatchingCard(c19772607.dryfilter,tp,0,LOCATION_MZONE,1,nil,def) end function c19772607.dryfilter(c,def) return c:IsFaceup() and c:GetAttack()<=def end --special summon function c19772607.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end function c19772607.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local zone=e:GetHandler():GetLinkedZone(tp) return zone~=0 and Duel.IsExistingMatchingCard(c19772607.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,zone) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c19772607.spop(e,tp,eg,ep,ev,re,r,rp) local zone=e:GetHandler():GetLinkedZone(tp) if zone==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c19772607.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,zone) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) end end --atk function c19772607.atkval(e,c) return c:GetLinkedGroupCount()*200 end --destroy function c19772607.drycost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c19772607.rfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,c19772607.rfilter,tp,LOCATION_HAND,0,1,1,nil) local def=g:GetFirst():GetDefense() e:SetLabel(def) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) end function c19772607.drytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(c19772607.dryfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c19772607.dryop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c19772607.dryfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) end --coin flip function c19772607.cncon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end function c19772607.cntg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) end function c19772607.cnop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71625222,1)) local coin=Duel.SelectOption(tp,60,61) local res=Duel.TossCoin(tp,1) if coin~=res then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SKIP_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) end end