Tips12

Last-modified: 2011-08-25 (木) 11:04:57

PCの最大/最小抵抗値や最大HP等

  • カテゴリー: 設定
  • 重要性: 普通
  • 投稿日: 2005-08-01 (月) 01:50:23

Scripts\Mobiles\PlayerMobile.cs このスクリプトはPCについて色々と記述されているので重要なスクリプトの一つ。

最大抵抗値(AOS)を全て100に変更

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; でもいけました。

最大抵抗値を属性ごとに設定

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;
}

最小抵抗値(AOS)の変更

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;
}

その他

HitsMax、StamMax、ManaMax