예제 #1
0
파일: attack.php 프로젝트: Naddiseo/WW2Game
			$spies = $cgi['numspies'];
			$race = $defender->race;
			$arace = $attacker->race;
			//$atacker->spies=$cgi['numspies'];
			$dif = $spyStrength - $spyDefStrength;
			if ($dif > 100) $dif = 100;
			$dif+= 100;
			$difPerc = $dif / 2;
			//  echo "--$difPerc--<br>";
			$sasoldiers = spiedValue($defender->sasoldiers, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$samercs = spiedValue($defender->samercs, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$dasoldiers = spiedValue($defender->dasoldiers, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$damercs = spiedValue($defender->damercs, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$untrainedMerc = spiedValue($defender->untrainedMerc, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$uu = spiedValue($defender->uu, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$strikeAction = getStrikeAction($defender);
			$strikeAction = spiedValue($strikeAction, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$defenceAction = getDefenseAction($defender);
			$defenceAction = spiedValue($defenceAction, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$covertSkill = spiedValue($defender->calevel, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$sf = spiedValue($defender->specialforces, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$sflevel = spiedValue($defender->sflevel, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$hh = spiedValue($defender->hhlevel, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$covertOperatives = spiedValue($defender->spies, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$siegeLevel = spiedValue($defender->salevel, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$atackTurns = spiedValue($defender->attackturns, $difPerc, $spyStrength, $spyDefStrength, $arace);
			$unitProduction = spiedValue($defender->up, $difPerc, $spyStrength, $spyDefStrength, $arace);
			/*
					 $weapons
					 $types
					 $quantities
예제 #2
0
파일: spy.php 프로젝트: Naddiseo/WW2Game
                                            </TABLE>
                                            <BR>
                                            <TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%"
            border=0>
                                                <TBODY>
                                                    <TR>
                                                        <TH colSpan=3>
                                                             Military Effectiveness
                                                        </TH>
                                                    </TR>
                                                    <TR>
                                                        <TD>
                                                            <B>Strike Action</B>
                                                        </TD>
                                                        <TD align=right>
                                                            <? numecho(getStrikeAction($user))
?>
                                                        </TD>
                                                        <TD align=right>
                                                             Ranked<?
if ($userR->sarank) {
	numecho($userR->sarank);
} else echo "#unranked";
?>
                                                        </TD>
                                                    </TR>
                                                    <TR>
                                                        <TD>
                                                            <B>Defensive Action</B>
                                                        </TD>
                                                        <TD align=right>
예제 #3
0
파일: vsys.php 프로젝트: Naddiseo/WW2Game
function updateUserStats($user) {
	$user = getUserDetails($user->ID, "ID,race,alliance,specialforces,sflevel,spies,calevel,dalevel,salevel,sasoldiers,samercs,dasoldiers,damercs,uu,hhlevel");
	$str = "UPDATE UserDetails SET SA='" . getStrikeAction($user) . "',
								DA='" . getDefenseAction($user) . "',
								CA='" . getCovertAction($user) . "',
								RA='" . getRetaliationAction($user) . "' WHERE ID='{$user->ID}'";
	mysql_query($str) or die(mysql_error());
}