/// <summary> /// ゴーレム /// </summary> private static void CastGolem() { StringBuilder gsb = new StringBuilder(1024); MagicCast.Status golemStatus; MagicCast.Golem(gsb, out golemStatus); Console.WriteLine(gsb.ToString() + "を召喚した!"); string sWeakness = ""; foreach (byte b in golemStatus.Weakness) { sWeakness += b.ToString(); } Console.WriteLine( string.Format(@"-------{0}のステータス----- Hp:{1} Power:{2} Sex:{3} Weakness:{4} ", gsb.ToString() , golemStatus.Hp.ToString() , golemStatus.Power.ToString() , golemStatus.Sex.ToString() , sWeakness )); }
/// <summary> /// レッドゴブリン(Ansi) /// </summary> private static void CastRedGoblin() { //レッドゴブリン(Ansi) string goblinName = ""; MagicCast.RedGoblin(ref goblinName); Console.WriteLine(goblinName + "を召喚した!"); }
/// <summary> /// ブルーゴブリン /// </summary> private static void CastBlueGoblin() { //ブルーゴブリン(Unicode) StringBuilder bsb = new StringBuilder(1024); MagicCast.BlueGoblin(bsb); Console.WriteLine(bsb.ToString() + "を召喚した!"); }
/// <summary> /// ドラゴンの高速詠唱 /// </summary> private static unsafe void FastCastDragon(bool consoleWeite) { StringBuilder csb = new StringBuilder(1024); MagicCast.StatusUnsafe[] cerberusHeads = new MagicCast.StatusUnsafe[7]; fixed(MagicCast.StatusUnsafe *ptr = cerberusHeads) { MagicCast.DragonUnsafe(csb, ptr); } if (consoleWeite == false) { return; } Console.WriteLine(csb.ToString() + "を召喚した!"); for (int idx = 0; idx < 7; idx++) { byte[] btemp = new byte[7]; fixed(byte *plb = cerberusHeads[idx].Weakness) { Marshal.Copy((IntPtr)plb, btemp, 0, 7); } string sWeakness = ""; foreach (byte b in btemp) { sWeakness += b.ToString(); } if (consoleWeite) { Console.WriteLine( string.Format(@"-------{1}{0}のステータス----- Hp:{2} Power:{3} Sex:{4} Weakness:{5} " , idx + 1 , csb.ToString() , cerberusHeads[idx].Hp.ToString() , cerberusHeads[idx].Power.ToString() , cerberusHeads[idx].Sex.ToString() , sWeakness )); } } }
/// <summary> /// ドラゴン /// </summary> private static void CastDragon(bool consoleWeite) { //引渡し用のStringBuilder(サイズ指定) StringBuilder csb = new StringBuilder(1024); //引数宣言 MagicCast.DragonHeads dragonHeads; //呼び出し MagicCast.Dragon(csb, out dragonHeads); if (consoleWeite == false) { return; } Console.WriteLine(csb.ToString() + "を召喚した!"); for (int idx = 0; idx < 7; idx++) { string sWeakness = ""; foreach (byte b in dragonHeads.head[idx].Weakness) { sWeakness += b.ToString(); } Console.WriteLine( string.Format(@"-------{1}{0}のステータス----- Hp:{2} Power:{3} Sex:{4} Weakness:{5} " , idx + 1 , csb.ToString() , dragonHeads.head[idx].Hp.ToString() , dragonHeads.head[idx].Power.ToString() , dragonHeads.head[idx].Sex.ToString() , sWeakness )); } }