本文整理汇总了C#中RunescapeServer.player.Player.getAttackStyle方法的典型用法代码示例。如果您正苦于以下问题:C# Player.getAttackStyle方法的具体用法?C# Player.getAttackStyle怎么用?C# Player.getAttackStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RunescapeServer.player.Player
的用法示例。
在下文中一共展示了Player.getAttackStyle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getPlayerMaxHit
public static double getPlayerMaxHit(Player player, int strBonusIncrease)
{
AttackStyle.CombatSkill fightType = player.getAttackStyle().getSkill();
double myCurStrength = player.getSkills().getCurLevel(Skills.SKILL.STRENGTH);
double myEquipStrengthBonus = (player.getEquipment().getBonus(Equipment.BONUS.STRENGTH) + strBonusIncrease);
double fightingStyle = 0;
double powerMultiplier = 1;
double dharokModifier = 1;
double damageMultiplier = 1;
int strPrayer = player.getPrayers().getStrengthPrayer();
if (strPrayer == 1)
{
powerMultiplier += 0.05;
}
else if (strPrayer == 2)
{
powerMultiplier += 0.1;
}
else if (strPrayer == 3)
{
powerMultiplier += 0.15;
}
else if (player.getPrayers().getSuperPrayer() == 1)
{
powerMultiplier += 0.18;
}
else if (player.getPrayers().getSuperPrayer() == 2)
{
powerMultiplier += 0.23;
}
if (wearingMeleeVoid(player))
{
damageMultiplier += 0.1;
} else if (wearingDharok(player))
{
dharokModifier = (player.getSkills().getGreaterLevel(Skills.SKILL.HITPOINTS) - player.getSkills().getCurLevel(Skills.SKILL.HITPOINTS)) * 0.1;
}
if (fightType.Equals(AttackStyle.CombatSkill.AGGRESSIVE))
{
fightingStyle = 3;
} else if (fightType.Equals(AttackStyle.CombatSkill.CONTROLLED))
{
fightingStyle = 1;
}
double cumulativeStrength = ((myCurStrength) * (powerMultiplier) + fightingStyle) * dharokModifier;
//Can't change this. For huge damage it's a visual effect, not real maxHit!
double maxHit = ((13 + (cumulativeStrength) + (myEquipStrengthBonus / 8) + ((cumulativeStrength * myEquipStrengthBonus) / 64)) * damageMultiplier) / 10; // NEW MAX HIT FORMULA
return maxHit;
}
示例2: getRangeDefence
public static double getRangeDefence(Player p)
{
int rangedDefenceBonus = p.getEquipment().getBonus(Equipment.BONUS.RANGED_DEFENCE);
double defenceLevel = p.getSkills().getCurLevel(Skills.SKILL.DEFENCE);
AttackStyle.CombatSkill fightType = p.getAttackStyle().getSkill();
if (fightType.Equals(AttackStyle.CombatSkill.DEFENSIVE))
defenceLevel *= 1.10; //%10 increase.
if(p.getPrayers().isPrayerActive(PrayerData.Prayer.THICK_SKIN))
defenceLevel *= 1.05; //5% increase.
else if (p.getPrayers().isPrayerActive(PrayerData.Prayer.ROCK_SKIN))
defenceLevel *= 1.10; //10% increase.
else if (p.getPrayers().isPrayerActive(PrayerData.Prayer.STEEL_SKIN))
defenceLevel *= 1.15; //15% increase.
else if (p.getPrayers().isPrayerActive(PrayerData.Prayer.SMITE))
defenceLevel *= 1.20; //20% increase.
else if (p.getPrayers().isPrayerActive(PrayerData.Prayer.CHIVALRY))
defenceLevel *= 1.25; //25% increase.
double rangeDefence = (defenceLevel * rangedDefenceBonus) / 200;
return rangeDefence;
}
示例3: getRangeMaxHit
public static double getRangeMaxHit(Player p, int bow, int arrow) {
/*
int a = p.getEquipment().getBonus(Equipment.BONUS.CRUSH_ATTACK);
int b = p.getEquipment().getBonus(Equipment.BONUS.CRUSH_DEFENCE);
int c = p.getEquipment().getBonus(Equipment.BONUS.MAGIC_ATTACK);
int d = p.getEquipment().getBonus(Equipment.BONUS.MAGIC_DEFENCE);
int e = p.getEquipment().getBonus(Equipment.BONUS.PRAYER);
int f = p.getEquipment().getBonus(Equipment.BONUS.RANGED_ATTACK);
int g = p.getEquipment().getBonus(Equipment.BONUS.RANGED_DEFENCE);
int h = p.getEquipment().getBonus(Equipment.BONUS.SLASH_ATTACK);
int i = p.getEquipment().getBonus(Equipment.BONUS.SLASH_DEFENCE);
int j = p.getEquipment().getBonus(Equipment.BONUS.STAB_ATTACK);
int k = p.getEquipment().getBonus(Equipment.BONUS.STAB_DEFENCE);
int l = p.getEquipment().getBonus(Equipment.BONUS.STRENGTH);
int m = p.getEquipment().getBonus(Equipment.BONUS.SUMMONING);
*/
double rangeLevel = p.getSkills().getCurLevel(Skills.SKILL.RANGE);
//TODO: use rangeAttackBonus in the formula somehow!.
double rangeAttackBonus = p.getEquipment().getBonus(Equipment.BONUS.RANGED_ATTACK);
double rangeAttackMultipler = 1.00;
double rangeAttack = 0;
int rangedWeaponArrowStrength = getRangeWeaponArrowStrength(p);
int rangePrayer = p.getPrayers().getRangePrayer();
if (rangePrayer == 1)
rangeAttackMultipler *= 1.05; //5% increase
else if (rangePrayer == 2)
rangeAttackMultipler *= 1.10; //10% increase
else if (rangePrayer == 3)
rangeAttackMultipler *= 1.15; //15% increase
if (wearingRangeVoid(p)) {
rangeAttackMultipler *= 1.15; //15% increase
}
rangeAttack = (rangeLevel * rangeAttackMultipler);
if (p.getAttackStyle().getStyle().Equals(AttackStyle.CombatStyle.RANGE_ACCURATE)) {
rangeAttack += 3.00;
}
double rangeMaxHit = ((rangeAttack + 8) * (rangedWeaponArrowStrength + 64) / 640);
return rangeMaxHit;
}
示例4: setButtonForAttackStyle
public static void setButtonForAttackStyle(Player p, int interfaceId)
{
if (interfaceId == -1)
{
return;
}
AttackStyle av = p.getAttackStyle();
AttackStyle.CombatSkill type = av.getSkill();
AttackStyle.CombatStyle type2 = av.getStyle();
int slot = av.getSlot();
switch (interfaceId)
{
case 92: // Unarmed
if (type.Equals(AttackStyle.CombatSkill.ACCURATE) || slot == 0)
{
p.getPackets().sendConfig(43, 0);
}
else if (type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) || slot == 1)
{
p.getPackets().sendConfig(43, 1);
}
else if (type.Equals(AttackStyle.CombatSkill.DEFENSIVE) || slot == 2 || slot == 3)
{
p.getPackets().sendConfig(43, 2);
av.setSlot(2);
}
break;
case 93: // Whip attack interface.
if (type.Equals(AttackStyle.CombatSkill.ACCURATE) || slot == 0)
{
p.getPackets().sendConfig(43, 0);
}
else if (type.Equals(AttackStyle.CombatSkill.CONTROLLED) || slot == 1)
{
p.getPackets().sendConfig(43, 1);
}
else if (type.Equals(AttackStyle.CombatSkill.DEFENSIVE) || slot == 2 || slot == 3)
{
p.getPackets().sendConfig(43, 2);
av.setSlot(2);
}
break;
case 89: // Dagger attack interface.
if (type.Equals(AttackStyle.CombatSkill.ACCURATE) || slot == 0)
{
p.getPackets().sendConfig(43, 0);
}
else if ((type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) && type2.Equals(AttackStyle.CombatStyle.STAB)) || slot == 1)
{
p.getPackets().sendConfig(43, 1);
}
else if ((type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) && type2.Equals(AttackStyle.CombatStyle.SLASH)))
{
p.getPackets().sendConfig(43, 2);
}
else if (type.Equals(AttackStyle.CombatSkill.DEFENSIVE) || slot == 2 || slot == 3)
{
p.getPackets().sendConfig(43, 3);
av.setSlot(3);
}
break;
case 82: // Longsword/scimitar attack interface.
if (type.Equals(AttackStyle.CombatSkill.ACCURATE) || slot == 0)
{
p.getPackets().sendConfig(43, 0);
}
else if (type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) && type2.Equals(AttackStyle.CombatStyle.SLASH) || slot == 1)
{
p.getPackets().sendConfig(43, 1);
}
else if (type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) && type2.Equals(AttackStyle.CombatStyle.CRUSH))
{
p.getPackets().sendConfig(43, 2);
}
else if (type.Equals(AttackStyle.CombatSkill.DEFENSIVE) || slot == 2 || slot == 3)
{
p.getPackets().sendConfig(43, 3);
av.setSlot(3);
}
break;
case 78: // Claw attack interface.
if (type.Equals(AttackStyle.CombatSkill.ACCURATE) || slot == 0)
{
p.getPackets().sendConfig(43, 0);
}
else if (type.Equals(AttackStyle.CombatSkill.AGGRESSIVE) || slot == 1)
{
p.getPackets().sendConfig(43, 1);
}
else if (type.Equals(AttackStyle.CombatSkill.CONTROLLED))
{
p.getPackets().sendConfig(43, 2);
}
else if (type.Equals(AttackStyle.CombatSkill.DEFENSIVE) || slot == 2 || slot == 3)
{
p.getPackets().sendConfig(43, 3);
//.........这里部分代码省略.........
示例5: configureButton
public static void configureButton(Player p, int interfaceId, int button)
{
AttackStyle av = p.getAttackStyle();
switch (interfaceId)
{
case 92: // Unarmed attack interface.
switch (button)
{
case 2: // Punch (Attack XP) - Crush
av.setSkill(AttackStyle.CombatSkill.ACCURATE);
av.setStyle(AttackStyle.CombatStyle.CRUSH);
av.setSlot(0);
break;
case 3: // Kick (Strength XP) - Crush
av.setSkill(AttackStyle.CombatSkill.AGGRESSIVE);
av.setStyle(AttackStyle.CombatStyle.CRUSH);
av.setSlot(1);
break;
case 4: // Block (Defence XP) - Crush
av.setSkill(AttackStyle.CombatSkill.DEFENSIVE);
av.setStyle(AttackStyle.CombatStyle.CRUSH);
av.setSlot(2);
break;
}
break;
case 93: // Whip attack interface.
switch (button)
{
case 2: // Flick (Attack XP) - Slash
av.setSkill(AttackStyle.CombatSkill.ACCURATE);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(0);
break;
case 3: // Lash (Shared XP) - Slash
av.setSkill(AttackStyle.CombatSkill.CONTROLLED);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(1);
break;
case 4: // Deflect (Defence XP) - Slash
av.setSkill(AttackStyle.CombatSkill.DEFENSIVE);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(2);
break;
}
break;
case 89: // Dagger attack interface.
switch (button)
{
case 2: // Stab (Attack XP) - Stab
av.setSkill(AttackStyle.CombatSkill.ACCURATE);
av.setStyle(AttackStyle.CombatStyle.STAB);
av.setSlot(0);
break;
case 3: // Lunge (Strength XP) - Stab
av.setSkill(AttackStyle.CombatSkill.AGGRESSIVE);
av.setStyle(AttackStyle.CombatStyle.STAB);
av.setSlot(1);
break;
case 4: // Slash (Strength XP) - Slash
av.setSkill(AttackStyle.CombatSkill.AGGRESSIVE);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(2);
break;
case 5: // Block (Defence XP) - Stab
av.setSkill(AttackStyle.CombatSkill.DEFENSIVE);
av.setStyle(AttackStyle.CombatStyle.STAB);
av.setSlot(3);
break;
}
break;
case 82: // Longsword/scimitar attack interface.
switch (button)
{
case 2: // Chop (Attack XP) - Slash
av.setSkill(AttackStyle.CombatSkill.ACCURATE);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(0);
break;
case 3: // Slash (Strength XP) - Slash
av.setSkill(AttackStyle.CombatSkill.AGGRESSIVE);
av.setStyle(AttackStyle.CombatStyle.SLASH);
av.setSlot(1);
break;
case 4: // Smash (Strength XP) - Crush
av.setSkill(AttackStyle.CombatSkill.AGGRESSIVE);
av.setStyle(AttackStyle.CombatStyle.CRUSH);
av.setSlot(2);
break;
//.........这里部分代码省略.........