#pragma strict_types

inherit "/d/Imperium/std/monster";
inherit "/lib/skill_raise";

#include "zol_naj.h"
#include <macros.h>
#include <stdproperties.h>
#include <ss_types.h>

void
create_monster()
{
    ustaw_nazwe ( ({"morgan", "morgana", "morganowi", "morgana", "morganem", "morganie"}),
		  ({"", "", "", "", "", ""}), PL_MESKI_OS);
    set_living_name ("_trener_kompanii");
    ustaw_odmiane_rasy (PL_CZLOWIEK);
    set_gender (G_MALE);
    dodaj_przym ("podstarzaly", "podstarzali");
    dodaj_przym ("silny", "silni");

    set_stats ( ({100, 100, 100, 70, 70, 130}) );
    add_prop (OBJ_M_NO_ATTACK, "To weteran Wolnej Kompanii Stirlandu, nie smiesz go " +
	      "zaatakowac.\n");
    add_notify_meet_interactive("spotkalem_kogos");
    sk_add_train (SS_WEP_SWORD, 10);
    sk_add_train (SS_WEP_WARHAMMER, 10);
}

void
spotkalem_kogos()
{
    if (ENGINE->query_member(this_player() ) )
	init_skill_raise();
}

int
sk_hook_cant_pay(int snum, int level, int cost)
{
    command ("usmiech lekko");
    command ("'do " + this_player()->query_real_name (PL_DOP) + 
	     " Moze bys najpierw zarobil, co?");
    command ("splun");
    return 1;
}

int 
sk_hook_improved_max(int snum, int level)
{
    command ("popatrz z niedowierz na " + this_player()->query_real_name (PL_BIE) );
    command ("'do " + this_player()->query_real_name (PL_DOP) + 
	     " To nieprawdopodobne, ale chyba jestes w tym tak dobry jak ja. " +
	     "W tej dziedzinie niczego wiecej juz cie nie naucze.");
    command ("usmiech smutno");
    return 1;
}

void
sk_hook_list_skills()
{
    command ("hmm");
    command ("popatrz uwaznie na " + this_player()->query_real_name (PL_BIE) );
    command ("'do " + this_player()->query_real_name (PL_DOP) + 
	     " Taaak, chyba moglbym nauczyc cie kilku rzeczy.");
}

int 
sk_hook_unknown_skill(string skill)
{
    command ("popatrz dziwnie na " + this_player()->query_real_name (PL_BIE) );
    command ("'do " + this_player()->query_real_name (PL_DOP) + 
	     " Czego mam cie uczyc???");
    command ("popukaj sie w czolo");
    return 1;
}

int
sk_hook_untrained_skill(int snum)
{
    command ("machnij reka lekcewazaco");
    command ("'do " + this_player()->query_real_name (PL_DOP) + " Ja tam nie " +
	     "trenuje takich glupot!");
    return 1;
}

int
sk_hook_raise_rank(int snum, int from, int steps, int cost)
{

    string skill = sk_add_in_prefix (sk_query_name (snum, 2) );
    command ("westchnij ciezko");
    command ("'do " + this_player()->query_real_name (PL_DOP) + 
	     " To bierzmy sie do roboty!");
    this_player()->catch_msg (this_object()->query_Imie (this_player(), PL_MIA) + 
	   (steps == 1 ? "" : " intensywnie") + " trenuje cie" + skill + ".\n");
    say (QCIMIE (this_object(), PL_MIA) + (steps == 1 ? "" : " intensywnie") + 
	 " trenuje " + QIMIE (this_player(), PL_BIE) + skill + ".\n");
}

int
sk_hook_no_more_improve()
{
    command ("potrzyj czolo");
    command ("'do " + this_player()->query_real_name (PL_DOP) + " Wyglada na to, " +
	     "ze nauczylem cie juz wszystkiego co sam umiem!");
    command ("popatrz z podziwem na " + this_player()->query_real_name (PL_BIE) );
    return 1;
}
