Scripts\Mobiles\PlayerMobile.cs このスクリプトはPCについて色々と記述されているので重要なスクリプトの一つ。
#code(csharp){{
public override int GetMaxResistance( ResistanceType type )
{
//int max = base.GetMaxResistance( type ); baseつまり継承元のMobileクラスの数値を呼び出している。この数値は70
int max = 100
if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
max = 60;//カースが効いている状態では最大60になる。この効果はプレイヤー限定なのでPlayerMobileに記述されている。
return max;
}
}}
これ書いてから気づいたんですが MaxPlayerResistance = 100; でもいけました。
#code(csharp){{
public override int GetMaxResistance( ResistanceType type )
{
int max = base.GetMaxResistance( type );
switch ( type )
{
case ResistanceType.Physical:
{
max = 75;
break;
}
case ResistanceType.Fire:
{
max = 80;
break;
}
case ResistanceType.Cold:
{
max = 85;
break;
}
case ResistanceType.Poison:
{
max = 90;
break;
}
case ResistanceType.Energy:
{
max = 95;
break;
}
}
if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
max = 60;
return max;
}
}}
#code(csharp){{
int baseMin = base.GetMinResistance( type );
switch (type)
{
case ResistanceType.Physical:
{
min = 0;//レジ保障抵抗値固定
break;
}
case ResistanceType.Fire:
{
break;
}
case ResistanceType.Cold:
{
break;
}
case ResistanceType.Poison:
{
min = ( min - 10 );//レジ保障値-10=抵抗値
break;
}
case ResistanceType.Energy:
{
min = ( min + 10 );//レジ保障値+10=抵抗値
break;
}
}
if ( min < baseMin )
min = baseMin;
return min;
}
}}