Skip to content

Commit

Permalink
add monster edit param
Browse files Browse the repository at this point in the history
  • Loading branch information
turtle-insect committed Jul 18, 2021
1 parent 09b97a3 commit 916fd56
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 5 deletions.
110 changes: 107 additions & 3 deletions MonsterHunterStories2/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,22 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="13*"/>
<RowDefinition/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<Label Content="{x:Static prop:Resources.MainBasicMoney}"/>
<TextBox Grid.Column="1" Text="{Binding Money, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="{x:Static prop:Resources.MainBasicPlayTime}"/>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="20"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding PlayTimeHour, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Column="1" Content=":"/>
<TextBox Grid.Column="2" Text="{Binding PlayTimeMinute, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
<Label Grid.Row="1" Content="{x:Static prop:Resources.MainBasicMoney}"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Money, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</TabItem>
<TabItem Header="{x:Static prop:Resources.MainTabCharacter}">
Expand Down Expand Up @@ -204,6 +216,98 @@
</ListBox.ItemTemplate>
</ListBox>
</TabItem>
<TabItem Header="{x:Static prop:Resources.MainMonsterTabInfo}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Content="{x:Static prop:Resources.MainMonsterNormalAttack}"/>
<Label Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.NormalElementAttack}"/>
<Label Grid.Row="1" Content="{x:Static prop:Resources.MainMonsterFireAttack}"/>
<Label Grid.Row="1" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.FireElementAttack}"/>
<Label Grid.Row="2" Content="{x:Static prop:Resources.MainMonsterWaterAttack}"/>
<Label Grid.Row="2" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.WaterElementAttack}"/>
<Label Grid.Row="3" Content="{x:Static prop:Resources.MainMonsterThunderAttack}"/>
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.ThunderElementAttack}"/>
<Label Grid.Row="4" Content="{x:Static prop:Resources.MainMonsterIceAttack}"/>
<Label Grid.Row="4" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.IceElementAttack}"/>
<Label Grid.Row="5" Content="{x:Static prop:Resources.MainMonsterDragonAttack}"/>
<Label Grid.Row="5" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.DragonElementAttack}"/>
<Label Grid.Row="6" Content="{x:Static prop:Resources.MainMonsterNormalDefense}"/>
<Label Grid.Row="6" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.NormalElementDefense}"/>
<Label Grid.Row="7" Content="{x:Static prop:Resources.MainMonsterFireDefense}"/>
<Label Grid.Row="7" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.FireElementDefense}"/>
<Label Grid.Row="8" Content="{x:Static prop:Resources.MainMonsterWaterDefense}"/>
<Label Grid.Row="8" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.WaterElementDefense}"/>
<Label Grid.Row="9" Content="{x:Static prop:Resources.MainMonsterThunderDefense}"/>
<Label Grid.Row="9" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.ThunderElementDefense}"/>
<Label Grid.Row="10" Content="{x:Static prop:Resources.MainMonsterIceDefense}"/>
<Label Grid.Row="10" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.IceElementDefense}"/>
<Label Grid.Row="11" Content="{x:Static prop:Resources.MainMonsterDragonDefense}"/>
<Label Grid.Row="11" Grid.Column="1" Content="{Binding ElementName=ListBoxMonster, Path=SelectedItem.DragonElementDefense}"/>
</Grid>
</TabItem>
<TabItem Header="{x:Static prop:Resources.MainMonsterTabBonus}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Content="{x:Static prop:Resources.MainMonsterNormalAttack}"/>
<TextBox Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.NormalElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="1" Content="{x:Static prop:Resources.MainMonsterFireAttack}"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.FireElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="2" Content="{x:Static prop:Resources.MainMonsterWaterAttack}"/>
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.WaterElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="3" Content="{x:Static prop:Resources.MainMonsterThunderAttack}"/>
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.ThunderElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="4" Content="{x:Static prop:Resources.MainMonsterIceAttack}"/>
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.IceElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="5" Content="{x:Static prop:Resources.MainMonsterDragonAttack}"/>
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.DragonElementAttackBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="6" Content="{x:Static prop:Resources.MainMonsterNormalDefense}"/>
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.NormalElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="7" Content="{x:Static prop:Resources.MainMonsterFireDefense}"/>
<TextBox Grid.Row="7" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.FireElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="8" Content="{x:Static prop:Resources.MainMonsterWaterDefense}"/>
<TextBox Grid.Row="8" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.WaterElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="9" Content="{x:Static prop:Resources.MainMonsterThunderDefense}"/>
<TextBox Grid.Row="9" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.ThunderElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="10" Content="{x:Static prop:Resources.MainMonsterIceDefense}"/>
<TextBox Grid.Row="10" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.IceElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="11" Content="{x:Static prop:Resources.MainMonsterDragonDefense}"/>
<TextBox Grid.Row="11" Grid.Column="1" Text="{Binding ElementName=ListBoxMonster, Path=SelectedItem.DragonElementDefenseBonus, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</TabItem>
</TabControl>
</Grid>
</TabItem>
Expand Down
168 changes: 168 additions & 0 deletions MonsterHunterStories2/Monster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,173 @@ public uint RideAction2
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(RideAction2)));
}
}

public uint CurrentHP
{
get { return SaveData.Instance().ReadNumber(mAddress + 72, 4); }
set { Util.WriteNumber(mAddress + 72, 4, value, 0, 999999); }
}

public uint MaxHP
{
get { return SaveData.Instance().ReadNumber(mAddress + 76, 4); }
set { Util.WriteNumber(mAddress + 76, 4, value, 0, 999999); }
}

public uint Speed
{
get { return SaveData.Instance().ReadNumber(mAddress + 80, 4); }
set { Util.WriteNumber(mAddress + 80, 4, value, 0, 999999); }
}

public uint NormalElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 132, 2); }
set { Util.WriteNumber(mAddress + 132, 2, value, 0, 0xFFFF); }
}

public uint FireElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 134, 2); }
set { Util.WriteNumber(mAddress + 134, 2, value, 0, 0xFFFF); }
}

public uint WaterElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 136, 2); }
set { Util.WriteNumber(mAddress + 136, 2, value, 0, 0xFFFF); }
}

public uint ThunderElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 138, 2); }
set { Util.WriteNumber(mAddress + 138, 2, value, 0, 0xFFFF); }
}

public uint IceElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 140, 2); }
set { Util.WriteNumber(mAddress + 140, 2, value, 0, 0xFFFF); }
}

public uint DragonElementAttack
{
get { return SaveData.Instance().ReadNumber(mAddress + 142, 2); }
set { Util.WriteNumber(mAddress + 142, 2, value, 0, 0xFFFF); }
}

public uint NormalElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 152, 2); }
set { Util.WriteNumber(mAddress + 152, 2, value, 0, 0xFFFF); }
}

public uint FireElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 154, 2); }
set { Util.WriteNumber(mAddress + 154, 2, value, 0, 0xFFFF); }
}

public uint WaterElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 156, 2); }
set { Util.WriteNumber(mAddress + 156, 2, value, 0, 0xFFFF); }
}

public uint ThunderElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 158, 2); }
set { Util.WriteNumber(mAddress + 158, 2, value, 0, 0xFFFF); }
}

public uint IceElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 160, 2); }
set { Util.WriteNumber(mAddress + 160, 2, value, 0, 0xFFFF); }
}

public uint DragonElementDefense
{
get { return SaveData.Instance().ReadNumber(mAddress + 162, 2); }
set { Util.WriteNumber(mAddress + 162, 2, value, 0, 0xFFFF); }
}

public uint HPBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 168, 1); }
set { Util.WriteNumber(mAddress + 168, 1, value, 0, 0xFF); }
}

public uint NormalElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 169, 1); }
set { Util.WriteNumber(mAddress + 169, 1, value, 0, 0xFF); }
}

public uint FireElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 170, 1); }
set { Util.WriteNumber(mAddress + 170, 1, value, 0, 0xFF); }
}

public uint WaterElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 171, 1); }
set { Util.WriteNumber(mAddress + 171, 1, value, 0, 0xFF); }
}

public uint ThunderElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 172, 1); }
set { Util.WriteNumber(mAddress + 172, 1, value, 0, 0xFF); }
}

public uint IceElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 173, 1); }
set { Util.WriteNumber(mAddress + 173, 1, value, 0, 0xFF); }
}

public uint DragonElementAttackBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 174, 1); }
set { Util.WriteNumber(mAddress + 174, 1, value, 0, 0xFF); }
}

public uint NormalElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 175, 1); }
set { Util.WriteNumber(mAddress + 175, 1, value, 0, 0xFF); }
}

public uint FireElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 176, 1); }
set { Util.WriteNumber(mAddress + 176, 1, value, 0, 0xFF); }
}

public uint WaterElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 177, 1); }
set { Util.WriteNumber(mAddress + 177, 1, value, 0, 0xFF); }
}

public uint ThunderElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 178, 1); }
set { Util.WriteNumber(mAddress + 178, 1, value, 0, 0xFF); }
}

public uint IceElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 179, 1); }
set { Util.WriteNumber(mAddress + 179, 1, value, 0, 0xFF); }
}

public uint DragonElementDefenseBonus
{
get { return SaveData.Instance().ReadNumber(mAddress + 180, 1); }
set { Util.WriteNumber(mAddress + 180, 1, value, 0, 0xFF); }
}
}
}
Loading

0 comments on commit 916fd56

Please sign in to comment.