summaryrefslogtreecommitdiff
path: root/npc/items/arcmage.txt
blob: 038be82cea88360446eee327cb0613797265de85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// TMW-2 script.
// Author:
//    Jesusalva
// Description:
//    Card boxsets, shout out for arcmage.org

// Create a random card, with rares
function	script	MakeRandomArcmageCard	{
    array_push(.@arcmagecards, NatureCard);
    array_push(.@arcmagecards, NinjaCard);
    array_push(.@arcmagecards, MageCard);
    array_push(.@arcmagecards, DruidCard);
    array_push(.@arcmagecards, ClericCard);
    array_push(.@arcmagecards, KnightCard);
    array_push(.@arcmagecards, HeroCard);
    array_push(.@arcmagecards, NecromancerCard);

    .@r=rand(0,10000);
    // 5% chances of a rare card
    // Actually only 1/3 of this rate is effective
    // Therefore real chances are of about 1.67%
    if (.@r < 500+(JobLevel*2)) {
        array_push(.@arcmagecards, SpeedCard);
        array_push(.@arcmagecards, ReflectCard);
        array_push(.@arcmagecards, PowerCard);
        array_push(.@arcmagecards, WallCard);
    }
    // You may get the S Card if you are lucky.
    // However, less than 1/2 of this rate is
    // effective, and it is not so flexible.
    // 0.05% at start and +0.1% per rebirth
    if (.@r < 5+(REBIRTH*10)) {
        array_push(.@arcmagecards, NatureCardS);
        array_push(.@arcmagecards, NinjaCardS);
        array_push(.@arcmagecards, MageCardS);
        array_push(.@arcmagecards, DruidCardS);
        array_push(.@arcmagecards, ClericCardS);
        array_push(.@arcmagecards, KnightCardS);
        array_push(.@arcmagecards, HeroCardS);
        array_push(.@arcmagecards, NecromancerCardS);
        // These cards does not have S version for drop
        array_push(.@arcmagecards, SpeedCard);
        array_push(.@arcmagecards, ReflectCard);
        array_push(.@arcmagecards, PowerCard);
        array_push(.@arcmagecards, WallCard);
    }

    getitem any_of(.@arcmagecards), 1;
    return;
}