Cleaned up the mess, at this time, only viable data get synced (_work directory for Gothic-data, miranda for mdc-scripts. Need to symlink files to a working directory.
111 lines
No EOL
2.5 KiB
D
111 lines
No EOL
2.5 KiB
D
var int shieldEquipped;
|
|
|
|
instance ItSh_Simple(C_Item)
|
|
{
|
|
name = "Einfacher Schild";
|
|
mainflag = ITEM_KAT_NF;
|
|
flags = ITEM_SHIELD;
|
|
value = 10;
|
|
protection[PROT_EDGE] = 20;
|
|
protection[PROT_BLUNT] = 20;
|
|
protection[PROT_POINT] = 20;
|
|
protection[PROT_FIRE] = 0;
|
|
protection[PROT_MAGIC] = 0;
|
|
visual = "shield.3ds";
|
|
material = MAT_WOOD;
|
|
on_equip = Equip_ItSh_Simple;
|
|
on_unequip = UnEquip_ItSh_Simple;
|
|
description = name;
|
|
text[1] = NAME_Prot_Edge;
|
|
count[1] = protection[PROT_EDGE];
|
|
text[2] = NAME_Prot_Point;
|
|
count[2] = protection[PROT_POINT];
|
|
text[3] = NAME_Prot_Fire;
|
|
count[3] = protection[PROT_FIRE];
|
|
text[4] = NAME_Prot_Magic;
|
|
count[4] = protection[PROT_MAGIC];
|
|
text[5] = NAME_Value;
|
|
count[5] = value;
|
|
};
|
|
|
|
func void Equip_Shield()
|
|
{
|
|
if (shieldEquipped == FALSE) {
|
|
if(self.HitChance[NPC_TALENT_1H] >= 60)
|
|
{
|
|
Mdl_ApplyOverlayMds(self,"SHIELD.MDS");
|
|
//PrintScreen("Schild angelegt!",-1,YPOS_LevelUp,FONT_Screen,2);
|
|
shieldEquipped = TRUE;
|
|
}
|
|
else
|
|
{
|
|
PrintScreen("Dafür habe ich kein Talent!",-1,YPOS_LevelUp,FONT_Screen,2);
|
|
AI_UnequipWeapons(self);
|
|
};
|
|
}
|
|
else {
|
|
PrintS("Ich kann nur einen Schild anlegen!");
|
|
AI_UnequipWeapons(self);
|
|
};
|
|
};
|
|
|
|
func void UnEquip_Shield()
|
|
{
|
|
Mdl_RemoveOverlayMds(self,"SHIELD.MDS");
|
|
shieldEquipped = FALSE;
|
|
};
|
|
|
|
instance ITSh_Royal(C_Item)
|
|
{
|
|
name = "Königlicher Schild";
|
|
mainflag = ITEM_KAT_NF;
|
|
flags = ITEM_SHIELD;
|
|
value = 100;
|
|
protection[PROT_EDGE] = 40;
|
|
protection[PROT_BLUNT] = 40;
|
|
protection[PROT_POINT] = 30;
|
|
protection[PROT_FIRE] = 10;
|
|
protection[PROT_MAGIC] = 0;
|
|
visual = "scena.3ds";
|
|
material = MAT_WOOD;
|
|
on_equip = Equip_ItSh_Royal;
|
|
on_unequip = UnEquip_ItSh_Royal;
|
|
description = name;
|
|
text[1] = NAME_Prot_Edge;
|
|
count[1] = protection[PROT_EDGE];
|
|
text[2] = NAME_Prot_Point;
|
|
count[2] = protection[PROT_POINT];
|
|
text[3] = NAME_Prot_Fire;
|
|
count[3] = protection[PROT_FIRE];
|
|
text[4] = NAME_Prot_Magic;
|
|
count[4] = protection[PROT_MAGIC];
|
|
text[5] = NAME_Value;
|
|
count[5] = value;
|
|
};
|
|
|
|
func void Equip_ItSh_Royal()
|
|
{
|
|
if (shieldEquipped == FALSE) {
|
|
if(self.HitChance[NPC_TALENT_1H] >= 60)
|
|
{
|
|
Mdl_ApplyOverlayMds(self,"SHIELD.MDS");
|
|
//PrintScreen("Schild angelegt!",-1,YPOS_LevelUp,FONT_Screen,2);
|
|
shieldEquipped = TRUE;
|
|
}
|
|
else
|
|
{
|
|
PrintScreen("Dafür habe ich kein Talent!",-1,YPOS_LevelUp,FONT_Screen,2);
|
|
AI_UnequipWeapons(self);
|
|
};
|
|
}
|
|
else {
|
|
PrintS("Ich kann nur einen Schild anlegen!");
|
|
AI_UnequipWeapons(self);
|
|
};
|
|
};
|
|
|
|
func void UnEquip_ItSh_Royal()
|
|
{
|
|
Mdl_RemoveOverlayMds(self,"SHIELD.MDS");
|
|
shieldEquipped = FALSE;
|
|
}; |