/// <summary> /// コンストラクタ /// </summary> /// <param name="wp">WP7</param> /// <param name="horseNum">馬番号</param> /// <param name="type">血統タイプ 父系or母系</param> public Pedigree( WP7 wp, UInt32 horseNum, 血統タイプ type ) { this.wp = wp; this.Type = type; this.HorseNum = horseNum; switch( type ) { case 血統タイプ.父系: var sire_data = new HSireData(); this.wp.HSireTable.GetData( this.HorseNum, ref sire_data ); this.BloodNum = sire_data.blood_num; break; case 血統タイプ.母系: var dam_data = new HDamData(); this.wp.HDamTable.GetData( this.HorseNum, ref dam_data ); this.BloodNum = dam_data.blood_num; break; } this.Tree = new Node( wp, type, 0, this.BloodNum, new 血統タイプ[]{ type } ); this.CreateTree( this.Tree ); var list = new List< NodeLevelPair >(); foreach( var node in this.NodeList() ) { list.Add( new NodeLevelPair( node.NodeLevel, node ) ); } this.NodeAndLevelList = list.ToArray(); }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { if( data.choushi_status != 3 ) { data.choushi_status = 2; } return data; }
public static HDamData CommandMain( WP7 wp, UInt32 horse_num, HDamData data ) { if( data.age < HDamData.age_MAXVALUE ) { data.age++; } return data; }
public static HChildData CommandMain( WP7 wp, UInt32 horse_num, HChildData data ) { var abl_data = new HAblData(); if( is_cancel == true ) { return data; } if( is_first_call == true ) { if( MessageBox.Show( "メモリを書き換えますよろしいですか?", "確認", MessageBoxButtons.OKCancel, MessageBoxIcon.Question ) == DialogResult.Cancel ) { is_cancel = true; return data; } is_first_call = false; } wp.HAblTable.GetData( data.abl_num, ref abl_data ); abl_data.speed = 85; abl_data.health = 3; // 健康 abl_data.power = 3; // パワー abl_data.zyuunan = 3; // 柔軟性 abl_data.syunpatsu = 3; // 瞬発力 abl_data.konzyou = 3; // 勝負根性 abl_data.kashikosa = 3; // 賢さ abl_data.seishin = 3; // 精神力 wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); data.seigen = 10; return data; }
public static HSireData CommandMain( WP7 wp, UInt32 horse_num, HSireData data ) { if( data.age > 0 ) { data.age--; } return data; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { if( (int)data.zyumyou - 5 <= 0 ) { data.zyumyou = 0; } else { data.zyumyou -= 5 ; } return data; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { if( (int)data.choushi - 5 < 0 ) { data.choushi = 0; } else { data.choushi -=5 ; } return data; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { if( HRaceData.hirou_MAXVALUE < data.hirou + 5 ) { data.hirou = HRaceData.hirou_MAXVALUE; } else { data.hirou += 5; } return data; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { var max = (uint)( 100 + data.seigen ); if( data.seichou + 5 > max ) { data.seichou = max; } else { data.seichou += 5; } return data; }
public DispBloodLineForm( WP7 wp, UInt32 blood_num ) { this.wp_ = wp; this.Setup_Cotrols(); var blood_data = new HBloodData(); this.wp_.HBloodTable.GetData( blood_num, ref blood_data ); this.Text = String.Format( "{0} の牝系図", get_name_by_data( ref blood_data ) ); this.DispBloodLine( blood_num ); }
public static HSireData CommandMain( WP7 wp, UInt32 horse_num, HSireData data ) { var abl_data = new HAblData(); wp.HAblTable.GetData( data.abl_num, ref abl_data ); if( abl_data.kodashi > 0 ) { abl_data.kodashi--; wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); } return data; }
public static HSireData CommandMain( WP7 wp, UInt32 horse_num, HSireData data ) { var abl_data = new HAblData(); wp.HAblTable.GetData( data.abl_num, ref abl_data ); abl_data.bokuzyou = 27; wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); return data; }
public static HDamData CommandMain( WP7 wp, UInt32 horse_num, HDamData data ) { var abl_data = new HAblData(); wp.HAblTable.GetData( data.abl_num, ref abl_data ); abl_data.kodashi = 0; wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); return data; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { var abl_data = new HAblData(); wp.HAblTable.GetData( data.abl_num, ref abl_data ); if( abl_data.kisyou < 4 ) { abl_data.kisyou += 1; } wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); return data; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="wp">WP7</param> /// <param name="family_line_info">系統状態のリスト</param> /// <param name="target_country">配合地域</param> /// <param name="sire_pedigree">種牡馬の血統</param> /// <param name="dam_pedigree">繁殖牝馬の血統</param> public Breeding( WP7 wp, FamilyLineInfo[] family_line_info, Horse.Area target_country, Pedigree sire_pedigree, Pedigree dam_pedigree ) { if( sire_pedigree.Type != Enums.血統タイプ.父系 ) { throw new ArgumentException("種牡馬の血統に繁殖牝馬の血統が与えられました"); } if( dam_pedigree.Type != Enums.血統タイプ.母系 ) { throw new ArgumentException("繁殖牝馬の血統に種牡馬の血統が与えられました"); } this.wp = wp; this.family_line_info = family_line_info; this.TargetCountry = target_country; this.SirePedigree = sire_pedigree; this.DamPedigree = dam_pedigree; this.DoCombination(); }
public static HDamData CommandMain( WP7 wp, UInt32 horse_num, HDamData data ) { var blood_data = new HBloodData(); wp.HBloodTable.GetData( data.blood_num, ref blood_data ); if( blood_data.factor_left >= 9 ) { blood_data.factor_left = 0; } else { blood_data.factor_left++; } wp.HBloodTable.SetData( data.blood_num, ref blood_data ); wp.HBloodTable.Commit( data.blood_num ); return data; }
public Controls( KOEI.WP7_2012.WP7 wp, KOEI.WP7_2012.Horse.Breeding.Enums.血統タイプ type, Enums.NameType dispNameType, UMAListView.Setting listViewSetting, Breeding.ListViewSetting breedingListViewSetting ) { this.InitializeComponent(); this.wp_ = wp; this.type_ = type; this.dispNameType_ = dispNameType; this.area_ = Area.日本; this.listViewSetting_ = listViewSetting; this.breedingListViewSetting_ = breedingListViewSetting; this.SetupControls(); }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { var abl_data = new HAblData(); wp.HAblTable.GetData( data.abl_num, ref abl_data ); if( abl_data.komawari_X != 0 ) { abl_data.komawari_X = 0; wp.HAblTable.SetData( data.abl_num, ref abl_data ); wp.HAblTable.Commit( data.abl_num ); } data.migimawari_X = 0; data.hidarimawari_X = 0; data.weak_point_1 = 0; data.weak_point_2 = 0; data.weak_point_3 = 0; return data; }
/// <summary> /// 馬リストを作る /// </summary> /// <param name="wp"></param> public void CreateHorseList( KOEI.WP7_2012.WP7 wp, object arg ) { this.ListView1.Items.Clear(); this.wp_ = wp; var items = this.CreateHorseListSub( wp, arg ); var sortOrders = new System.Windows.Forms.SortOrder[ this.ListView1.Columns.Count ]; for( var i=0; i<sortOrders.Length; ++i ) { var mode = (UMAListView.Sorter.ComparerMode)this.ListView1.Columns[i].Tag; switch( mode ) { case UMAListView.Sorter.ComparerMode.TAG_STRING: case UMAListView.Sorter.ComparerMode.STRING: case UMAListView.Sorter.ComparerMode.TAG_DATETIME: sortOrders[i] = SortOrder.Ascending; break; case UMAListView.Sorter.ComparerMode.NUMERIC: case UMAListView.Sorter.ComparerMode.TAG_HEXADECIMAL: case UMAListView.Sorter.ComparerMode.TAG_NUMERIC: sortOrders[i] = SortOrder.Descending; break; } } this.ListView1.Tag = sortOrders; this.ListViewItemsSort( items, this.ListViewDefaultSortColumn ); this.ListView1.BeginUpdate(); this.ListView1_VirtualItems = items; this.ListView1.VirtualListSize = items.Length; this.ListView1_OddColor(); this.ListView1.EndUpdate(); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="wp">WP7</param> /// <param name="type">血統タイプ</param> /// <param name="nodeLevel">ノードレベル</param> /// <param name="bloodNum">血統番号</param> /// <param name="line">ノードの位置を示す血統タイプの配列</param> /// <param name="fatherNode">父馬のノード</param> /// <param name="motherNode">母馬のノード</param> public Node( WP7 wp, 血統タイプ type, UInt32 nodeLevel, UInt32 bloodNum, 血統タイプ[] line, Node fatherNode, Node motherNode ) { this.Type = type; this.NodeLevel = nodeLevel; this.BloodNum = bloodNum; this.Line = line; this.Father = fatherNode; this.Mother = motherNode; var blood_data = new HBloodData(); wp.HBloodTable.GetData( bloodNum, ref blood_data ); this.Data = blood_data; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="wp">WP7</param> /// <param name="type">血統タイプ</param> /// <param name="nodeLevel">ノードレベル</param> /// <param name="bloodNum">血統番号</param> /// <param name="line">ノードの位置を示す血統タイプの配列</param> public Node( WP7 wp, 血統タイプ type, UInt32 nodeLevel, UInt32 bloodNum, 血統タイプ[] line ) : this(wp, type, nodeLevel, bloodNum, line, null, null) { }
private Boolean IsViewRecord( WP7 wp, UInt32 horse_num, ref HDamData data, ref HAblData abl_data ) { if( !this.ListViewConfig.Status_Intai && data.intai != 0 ) { return false; } if( !this.ListViewConfig.Status_Geneki && data.intai == 0 ) { return false; } if( this.ListViewConfig.OwnerHorse || this.ListViewConfig.ClubHorse ) { switch( abl_data.bokuzyou ) { case 25: case 27: case 28: if( !this.ListViewConfig.OwnerHorse ) return false; break; case 26: if( !this.ListViewConfig.ClubHorse ) return false; break; default: return false; } } var country = Helper.GetCountryByBokuzyouNum( abl_data.bokuzyou ); switch( country ) { case Enums.CountryType.JAPAN: if( !this.ListViewConfig.Country_JAPAN ) return false; break; case Enums.CountryType.USA: if( !this.ListViewConfig.Country_USA ) return false; break; case Enums.CountryType.EURO: if( !this.ListViewConfig.Country_EURO ) return false; break; default: throw new Exception("[BUG]"); } return true; }
private String GetDispName( WP7 wp, out String father_name, out String mother_name, ref HBloodData blood_data, ref HAblData abl_data, ref HBloodData father_blood_data, ref HBloodData mother_blood_data ) { // var name_type = Helper.GetCountryByBokuzyouNum( abl_data.bokuzyou ) == Enums.CountryType.JAPAN // ? WP7_2012ULV.Enums.NameType.KANA // : WP7_2012ULV.Enums.NameType.ENGLISH; var name_type = WP7_2012ULV.Enums.NameType.ENGLISH; if( this.ListViewConfig.DispNameType == WP7_2012ULV.Enums.NameType.KANA ) { name_type = WP7_2012ULV.Enums.NameType.KANA; } if( father_blood_data.display == 1 && name_type == WP7_2012ULV.Enums.NameType.ENGLISH ) { father_name = wp.馬名( WP7_2012ULV.Enums.NameType.ENGLISH, father_blood_data.name_left, father_blood_data.name_right ); } else { father_name = wp.馬名( WP7_2012ULV.Enums.NameType.KANA, father_blood_data.name_left, father_blood_data.name_right ); } if( mother_blood_data.display == 1 && name_type == WP7_2012ULV.Enums.NameType.ENGLISH ) { mother_name = wp.馬名( WP7_2012ULV.Enums.NameType.ENGLISH, mother_blood_data.name_left, mother_blood_data.name_right ); } else { mother_name = wp.馬名( WP7_2012ULV.Enums.NameType.KANA, mother_blood_data.name_left, mother_blood_data.name_right ); } var name = ""; if( blood_data.display == 1 ) { name = wp.馬名( name_type, blood_data.name_left, blood_data.name_right ); } else { name = wp.馬名( WP7_2012ULV.Enums.NameType.KANA, blood_data.name_left, blood_data.name_right ); } return name; }
public static HDamData CommandMain( WP7 wp, UInt32 horse_num, HDamData data ) { data.intai = 0; return data; }
public static HChildData CommandMain( WP7 wp, UInt32 horse_num, HChildData data ) { data.seigen = 10; return data; }
public static HChildData CommandMain( WP7 wp, UInt32 horse_num, HChildData data ) { if( is_cancel == true ) { return data; } var dam_data = new HDamData(); wp.HDamTable.GetData( data.mother_num, ref dam_data ); var form = new DispBloodLineForm( wp, dam_data.blood_num ); if( form.ShowDialog() == DialogResult.No ) { is_cancel = true; } return data; }
public static HSireData CommandMain( WP7 wp, UInt32 horse_num, HSireData data ) { data.bookfull = 0; return data; }
private Boolean IsViewRecord( WP7 wp, UInt32 horse_num, ref HRaceData data ) { if( this.ListViewConfig.WatchHorse ) { return data.kansen == 1; } switch( data.age ) { case 0: if( !this.ListViewConfig.Age_2 ) return false; break; case 1: if( !this.ListViewConfig.Age_3 ) return false; break; default: if( !this.ListViewConfig.Age_ETC ) return false; break; } switch( horse_num <= 0xb3f ? Enums.CountryType.JAPAN : horse_num <= 0xe4b ? Enums.CountryType.USA : Enums.CountryType.EURO ) { case Enums.CountryType.JAPAN: if( !this.ListViewConfig.Country_JAPAN ) return false; break; case Enums.CountryType.USA: if( !this.ListViewConfig.Country_USA ) return false; break; case Enums.CountryType.EURO: if( !this.ListViewConfig.Country_EURO ) return false; break; default: throw new Exception("[BUG]"); } switch( data.intai ) { case 0: if( !this.ListViewConfig.Status_Geneki ) { return false; } break; default: if( !this.ListViewConfig.Status_Intai ) return false; break; } if( this.ListViewConfig.OwnerHorse || this.ListViewConfig.ClubHorse || this.ListViewConfig.WatchHorse ) { switch( data.owner ) { case 41: if( !this.ListViewConfig.OwnerHorse ) return false; break; case 42: if( !this.ListViewConfig.ClubHorse ) return false; break; default: return false; } } return true; }
private UInt32 GetRaceString( ref WP7 wp, ref HRaceData data, ref String zisou_race_name, ref String zisou_sort_string ) { if( data.nyuukyuu == 0 ) { zisou_race_name = "入厩前"; zisou_sort_string = String.Format( "Y-00-00" ); return 0; } else if( data.houbokuchuu > 0 ) { zisou_sort_string = String.Format( "Z-{0:D2}-{1:D2}", data.houbokuchuu, data.houboku_len ); // zisou_race_name = String.Format( "{0}放牧中(残り{1}週) {2}", data.houbokuchuu.放牧理由(), data.houboku_len, zisou_sort_string ); zisou_race_name = String.Format( "{0}放牧中(残り{1}週)", data.houbokuchuu.放牧理由(), data.houboku_len ); return 0; } if( data.rase_next_week > wp.Config.YearWeekLength ) { zisou_race_name = "不明なレース(1)"; zisou_sort_string = String.Format( "X-00-00" ); return 0; } var week = wp.RProgramTable[ data.rase_next_week ]; var pos = 0u; if( data.rase_next_location != 3 ) { pos += data.rase_next_location * 22; pos += data.rase_next_sunday == 0u ? 0u : 11u; pos += data.rase_next_num; } else { pos += 22 * 3; pos += (uint)( data.rase_next_sunday == 1 || data.rase_next_num > 13 ? 14 : 0 ); pos += data.rase_next_num; } if( pos > (wp.Config.RaceProgramTable.RecordSize / 2) ) { zisou_race_name = "不明なレース(2)"; zisou_sort_string = String.Format( "W-00-00" ); return 0; } var race_num = week[pos]; var str = String.Empty; var race_data = new KOEI.WP7_2012.Datastruct.RRaceData(); if( race_num == wp.Config.NullRaceProgramNumber ) { str = "不明なレース"; } else { wp.RDataTable.GetData( race_num, ref race_data ); str = wp.RNameTable[ (int)race_data.race_name_num ].ShortName; } zisou_sort_string = String.Format( "{0}-{1:D2}-{2:D2}", ( data.race_next_age == data.age ? "A" : "B" ), data.rase_next_week, pos ); // zisou_race_name = String.Format( "{0} - {1}({2})", wp.月週( data.rase_next_week ), str, zisou_sort_string ); zisou_race_name = String.Format( "{0} - {1}", wp.月週( data.rase_next_week ), str ); return race_data.distance; }
public static HRaceData CommandMain( WP7 wp, UInt32 horse_num, HRaceData data ) { data.seichou = 100 + data.seigen; return data; }