instance DIA_Sentenza_test(C_Info)
{
    npc = SLD_814_Sentenza;
    nr = 998;
    condition = DIA_Sentenza_test_Condition;
    information = DIA_Sentenza_test_Info;
    permanent = TRUE;
    description = "Кто я?";
};
func int DIA_Sentenza_test_Condition()
{
    return TRUE;
};
func void DIA_Sentenza_test_Info()
{
    if(Npc_HasItems(other,ItMw_BeliarWeapon_1H_01) == 0)
    {
        CreateInvItem(other,ItMw_BeliarWeapon_1H_01);
    };
    if (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(hero))
    {
        Hlp_PrintConsole("-->  Dialog --> other == hero");
    };
    if (Npc_IsPlayer(other) == true)
    {
        Hlp_PrintConsole("-->  Dialog --> Npc_IsPlayer");
    };
    Hlp_PrintConsole("-->  End Dialog");
};
func void B_BeliarsWeaponSpecialDamage(var C_Npc oth,var C_Npc slf)
{
    var int DamageRandy;
    DamageRandy = 1;
    if(Hlp_GetInstanceID(oth) == Hlp_GetInstanceID(hero))
    {
        Hlp_PrintConsole("-->  B_BeliarsWeaponSpecialDamage --> other == hero");
        if(C_ScHasReadiedBeliarsWeapon() && (DamageRandy <= BeliarDamageChance))
        {
            if(slf.aivar[AIV_MM_REAL_ID] == ID_DRAGON_UNDEAD)
            {
                Wld_PlayEffect("spellFX_BELIARSRAGE",oth,oth,0,0,0,FALSE);
                B_MagicHurtNpc(slf,oth,100);
            }
            else if(slf.flags != NPC_FLAG_IMMORTAL)
            {
                Wld_PlayEffect("spellFX_BELIARSRAGE",slf,slf,0,0,0,FALSE);
                B_MagicHurtNpc(oth,slf,100);
            };
            Wld_PlayEffect("spellFX_BELIARSRAGE_COLLIDE",hero,hero,0,0,0,FALSE);
        };
        if(C_ScHasReadiedBeliarsWeapon() && (DamageRandy <= 50))
        {
            Wld_PlayEffect("spellFX_BELIARSRAGE_COLLIDE",hero,hero,0,0,0,FALSE);
        };
    };
    if(Npc_IsPlayer(oth) == true)
    {
        Hlp_PrintConsole("-->  B_BeliarsWeaponSpecialDamage --> Npc_IsPlayer");
        DamageRandy = Hlp_Random(1);
        if(C_ScHasReadiedBeliarsWeapon() && (DamageRandy <= BeliarDamageChance))
        {
            if(slf.aivar[AIV_MM_REAL_ID] == ID_DRAGON_UNDEAD)
            {
                Wld_PlayEffect("spellFX_INCOVATION_WHITE",oth,oth,0,0,0,FALSE);
                B_MagicHurtNpc(slf,oth,100);
            }
            else if(slf.flags != NPC_FLAG_IMMORTAL)
            {
                Wld_PlayEffect("spellFX_INCOVATION_WHITE",slf,slf,0,0,0,FALSE);
                B_MagicHurtNpc(oth,slf,100);
            };
            Wld_PlayEffect("spellFX_INCOVATION_WHITE",hero,hero,0,0,0,FALSE);
        };
        if(C_ScHasReadiedBeliarsWeapon() && (DamageRandy <= 50))
        {
            Wld_PlayEffect("spellFX_INCOVATION_WHITE",hero,hero,0,0,0,FALSE);
        };
    };
    Hlp_PrintConsole("-->  End SpecialDamage");
};