|
看不懂,求指教- 设定攻击范围
- procedure SetAminationPosition(mode, step: integer; range: integer = 0); overload;
- begin
- SetAminationPosition(Bx, By, Ax, Ay, mode, step, range);
- end;
- procedure SetAminationPosition(Bx, By, Ax, Ay, mode, step: integer; range: integer = 0); overload;
- var
- i, i1, i2: integer;
- begin
- FillChar(Bfield[4, 0, 0], 4096 * 2, 0);
- //按攻击类型
- case mode of
- 0:
- begin
- Bfield[4, Ax, Ay] := 1;
- end;
- 3:
- begin
- for i1 := max(Ax - range, 0) to min(Ax + range, 63) do
- for i2 := max(Ay - range, 0) to min(Ay + range, 63) do
- Bfield[4, i1, i2] := (abs(i1 - Bx) + abs(i2 - By)) * 2 + random(24) + 1;
- end;
- 1:
- begin
- i := 1;
- i1 := sign(Ax - Bx);
- i2 := sign(Ay - By);
- if i1 > 0 then
- step := min(63 - Bx, step);
- if i2 > 0 then
- step := min(63 - By, step);
- if i1 < 0 then
- step := min(Bx, step);
- if i2 < 0 then
- step := min(By, step);
- if (i1 = 0) and (i2 = 0) then
- step := 0;
- while i <= step do
- begin
- Bfield[4, Bx + i1 * i, By + i2 * i] := i * 2;
- i := i + 1;
- end;
- end;
- 2:
- begin
- for i1 := max(Bx - step, 0) to min(Bx + step, 63) do
- Bfield[4, i1, By] := abs(i1 - Bx) * 2;
- for i2 := max(By - step, 0) to min(By + step, 63) do
- Bfield[4, Bx, i2] := abs(i2 - By) * 2;
- end;
- end;
- case mode of
- 0: maxdelaypicnum := 1;
- 3: maxdelaypicnum := 24;
- 1: maxdelaypicnum := step * 4;
- 2: maxdelaypicnum := step * 4;
- end;
复制代码 怎样使 点 改为 菱形(可增大攻击范围) 线 改为 楔形(可增大宽度)
十 改为 米形(可增加斜线)
(如果可以 也请指教怎样增加自伤 杀体 杀内伤等机能)
复刻版就是这里的http://pan.baidu.com/s/1pJ9Giwj#path=%252F
|
|