private void button1_Click(object sender, EventArgs e) { var new_promise = new Promises(); new_promise.promise_to = this_family.name; new_promise.promise_vs = the_cast.the_patricians.FindLast(x => x.name.family_name_string == radioGroup2.Properties.Items[radioGroup2.SelectedIndex].Description).name; new_promise.relationship_bonus = 5; new_promise.turn_due = the_state.turn_number + 5; new_promise.type_of_promise = Promise.Insult; the_cast.the_player.promises.Add(new_promise); MessageBox.Show("You promise to insult, " + new_promise.promise_vs.family_name_string); }
private void button1_Click(object sender, EventArgs e) { //money int money = (int)moneyRadioGroup.Properties.Items[moneyRadioGroup.SelectedIndex].Value; the_cast.the_player.wealth += money; the_cast.the_player.debt += money; var promise = new Promises(); //promise switch (promiseRadioGroup.SelectedIndex) { case 0: promise.type_of_promise = Promise.Assasinate; promise.turn_due = the_state.turn_number + 5; break; case 1: promise.type_of_promise = Promise.Insult; promise.turn_due = the_state.turn_number + 5; break; case 2: promise.type_of_promise = Promise.RepayDouble; promise.turn_due = the_state.turn_number + 14; promise.amount_owed = money * 2; break; case 3: promise.type_of_promise = Promise.RepayTriple; promise.turn_due = the_state.turn_number + 14; promise.amount_owed = money * 3; break; default: return; } promise.promise_to = family.name; promise.promise_vs = family.name; promise.relationship_bonus = 10; the_cast.the_player.promises.Add(promise); //make a loan request //add promise //add money }