EffectDisease(int)
病気effectを作成します。
effect EffectDisease( int nDiseaseType );
Parameters
nDiseaseType
このeffectに適用するDISEASE_*定数グループから選ばれた病気のタイプ。
Description
目標に適用される時、それらに病気を引き起こす新しいeffect。
病気の種類はDISEASE_* 定数グループから選ばれます。
Remarks
このeffectはApplyEffectToObject()の中で使用することで効果を表します。使用する場合は、そちらもご覧下さい。
Version
1.22
Example
/*
.オブジェクトのOnUsedイベントに置いてください。
o病気の潜伏期の間、それが使われて1時間毎に、新しい病気に
dオブジェクトを感染させることを試みさせます。
h
.それは、ゲームにおいて定義されたすべての病気を通じてループします
*/
#include "nw_i0_plot"
// 現在と次の病気の名前を報告するために使用します。
string GetDiseaseName(int nCurrentEffect);
void main()
{
int nCurrentEffect;
int nNextEffect;
effect eDisease;
object oPC;
string sDisease;
nCurrentEffect = GetLocalInt(OBJECT_SELF,"nCurrentEffect");
eDisease = EffectDisease(nCurrentEffect);
oPC = GetLastUsedBy();
RemoveEffects(oPC);
sDisease = GetDiseaseName(nCurrentEffect);
SendMessageToPC(oPC,"Applying Disease number " + IntToString(nCurrentEffect) + " " + sDisease);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eDisease,oPC,30.0f);
if( nCurrentEffect == 16)
{
nNextEffect=0;
}else{
nNextEffect=nCurrentEffect+1;
}
SetLocalInt(OBJECT_SELF,"nCurrentEffect",nNextEffect);
sDisease = GetDiseaseName(nNextEffect);
SendMessageToPC(oPC,"Advancing 1 hour to End of Incubation Stage in 10 seconds.");
DelayCommand(10.0, SetTime(1,0,0,0));
DelayCommand(3600.0, SendMessageToPC(oPC,"Next Disease number " + IntToString(nNextEffect) + " - " + sDisease));
return;
}
string GetDiseaseName(int nCurrentEffect)
{
string sDisease = "";
switch (nCurrentEffect)
{
case 0:
sDisease = "DISEASE_BLINDING_SICKNESS";
break;
case 1:
sDisease = "DISEASE_CACKLE_FEVER";
break;
case 2:
sDisease = "DISEASE_DEVIL_CHILLS";
break;
case 3:
sDisease = "DISEASE_DEMON_FEVER";
break;
case 4:
sDisease = "DISEASE_FILTH_FEVER";
break;
case 5:
sDisease = "DISEASE_MINDFIRE";
break;
case 6:
sDisease = "DISEASE_MUMMY_ROT";
break;
case 7:
sDisease = "DISEASE_RED_ACHE";
break;
case 8:
sDisease = "DISEASE_SHAKES";
break;
case 9:
sDisease = "DISEASE_SLIMY_DOOM";
break;
case 10:
sDisease = "DISEASE_RED_SLAAD_EGGS";
break;
case 11:
sDisease = "DISEASE_GHOUL_ROT";
break;
case 12:
sDisease = "DISEASE_ZOMBIE_CREEP";
break;
case 13:
sDisease = "DISEASE_DREAD_BLISTERS";
break;
case 14:
sDisease = "DISEASE_BURROW_MAGGOTS";
break;
case 15:
sDisease = "DISEASE_SOLDIER_SHAKES";
break;
case 16:
sDisease = "DISEASE_VERMIN_MADNESS";
break;
}
return sDisease;
}
See Also
| functions: | EffectPoison |
| categories: | Effects Functions |
| constants: | DISEASE_* Constants |
author: John Shuell, JP team: akito
Send comments on this topic.