C # development Wpf/silverlight animation and games series Tutorials (Game Course): (28)

Source: Internet
Author: User
Tags min silverlight

C # development Wpf/silverlight animation and game series Tutorials (Game Course): (28) Classic attribute design and perfect physical attack system

The battle is about to begin! To implement the attack system in MMORPG, it is necessary to add the relevant parameters and attributes to the elves, which determines the novelty and the game-playing nature of the games; like the legend of the year, the system is more common, but because of the proper system parameters and perfect world view positioning, The achievement of a generation of monumental masterpiece. So in this section, I'm going to start by perfecting the wizard control to make it a role attribute in traditional classic games.

First look at the following figure:

These properties are currently the most classic role attribute settings (in different games, some attributes may be named differently.) For example, the "physique" attribute in the above figure is what I call "physique" in the example game of this section; the "horoscope" attribute I call "luck" and so on, but the meaning is the same; we analyze first: power, intelligence, agility, physique, luck. These 5 attributes are the root attribute in all basic properties, what is the root attribute? is the lowest level of all the base value attributes. When the role is upgraded, the 5 root attributes are added by hand or by system automatically according to the professional characteristics of the role, while all other base value attributes associated with it are affected simultaneously. For example, I define these 5 root attributes in this way:

Double _vpower;

<summary>

Get or set power

Impact maximum weight, physical attack (Min-max)

--[related Base Value property calculation formula]:

Max weight bearing = abase[0] + equip[0] + buff[0] + vpower * Coefficient[0]

Physical attack minimum = abase[1] + equip[1] + buff[1] + vpower * coefficient[1]

Physical attack maximum = abase[2] + equip[2] + buff[2] + vpower * coefficient[2]

</summary>

Public double Vpower {

get {return _vpower + equip[16] + buff[16];}

set {_vpower = value;}

}

Double _vagile;

<summary>

Gets or sets the agile

Impact hit, Dodge, run speed, attack speed, casting speed

--[related Base Value property calculation formula]:

Hit = Abase[3] + equip[3] + buff[3] + vagile * Coefficient[3]

Dodge = Abase[4] + equip[4] + buff[4] + vagile * Coefficient[4]

Run speed = abase[5]-equip[5] + buff[5]-vagile * coefficient[5]

Object Attack speed = Abase[6]-equip[6] + buff[6]-vagile * coefficient[6]

Casting speed = abase[7]-equip[7] + buff[7]-vagile * coefficient[7]

</summary>

Public double Vagile {

get {return _vagile + equip[17] + buff[17];}

set {_vagile = value;}

}

Double _vphysique;

<summary>

Gets or sets the physical

Affect maximum life, physical defense, block rate (in contrast to crit rate, physical or magical attack damage by half)

--[related Base Value property calculation formula]:

Maximum life value = Abase[8] + equip[8] + buff[8] + vphysique * Coefficient[8]

Physical defensive force = abase[9] + equip[9] + buff[9] + vphysique * coefficient[9]

Grid rate = Abase[10] + equip[10] + buff[10] + vphysique * COEFFICIENT[10]

</summary>

Public double Vphysique {

get {return _vphysique + equip[18] + buff[18];}

set {_vphysique = value;}

}

Double _vwisdom;

<summary>

Get or set intelligence

Maximum mana value, mana Defense, Magic Attack (Min-max)

--[related Base Value property calculation formula]:

Maximum mana value = abase[11] + equip[11] + buff[11] + vwisdom * COEFFICIENT[11]

Mana Defensive force = abase[12] + equip[12] + buff[12] + vwisdom * COEFFICIENT[12]

Magic Attack minimum = abase[13] + equip[13] + buff[13] + vwisdom * coefficient[13]

Magic Attack maximum = abase[14] + equip[14] + buff[14] + vwisdom * COEFFICIENT[14]

</summary>

Public double Vwisdom {

get {return _vwisdom + equip[19] + buff[19];}

set {_vwisdom = value;}

}

Double _vlucky;

<summary>

Get or set lucky

Impact Crit Rate (double physical or magical attack) and others

--[related Base Value property calculation formula]:

Crit rate = abase[15] + equip[15] + buff[15] + vlucky * ACOEFFICIENT[15]

</summary>

Public double Vlucky {

get {return _vlucky + equip[20] + buff[20];}

set {_vlucky = value;}

}

<summary>

Gets or sets the property cardinality

0-14 corresponding underlying property values

</summary>

Public double[] Abase {get; set;}

<summary>

Get or set the sum of the equipment added

0-14 corresponding underlying property values

15-19 corresponding to 5 large attributes

</summary>

Public double[] Equip {get; set;}

<summary>

Gets or sets the sum of the hold/reduce value

0-14 corresponding underlying property values

15-19 corresponding to 5 large attributes

</summary>

Public double[] Buff {get; set;}

<summary>

Gets or sets the property factor (growth rate)

0-14 corresponding underlying property values

</summary>

Public double[] coefficient {get; set;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.