24       if (! (mask & (1<<direction)))
 
   27       assert(! offset.
zero());
 
   28       const int x = offset.
dx();
 
   29       const int y = offset.
dy();
 
   30       for (
int dy=-1; dy<=1; ++dy)
 
   32         for (
int dx=-1; dx<=1; ++dx)
 
   36             has_unblockable_effect = 
true;
 
   43         for (
int i=1; i<8; ++i)
 
   45           const int long_x = x*i;
 
   46           const int long_y = y*i;
 
   47           const int target_x = x*(i+1);
 
   48           const int target_y = y*(i+1);
 
   53         for (
int i=1; i<9; ++i)
 
   55           const int long_x = x*i;
 
   56           const int long_y = y*i;
 
   57           for (
int dy=-1; dy<=1; ++dy)
 
   59             const int target_y = long_y+dy;
 
   60             if ((target_y < -8) || (8 < target_y))
 
   62             for (
int dx=-1; dx<=1; ++dx)
 
   64               const int target_x = long_x+dx;
 
   65               if ((target_x < -8) || (8 < target_x))
 
   88     && state.hasEffectIf(ptypeo, from, target);
 
   98     if (abs(from.
y() - target.
y()) > 3) 
 
  100     if (abs(from.
x() - target.
x()) > 2)
 
  103   else if (ptype == 
LANCE)
 
  105     if (abs(from.
x() - target.
x()) > 1)
 
  110   return hasEffectFromTo(state, ptypeo, from, target, 
UL)
 
  111     || hasEffectFromTo(state, ptypeo, from, target, 
U)
 
  112     || hasEffectFromTo(state, ptypeo, from, target, 
UR)
 
  113     || hasEffectFromTo(state, ptypeo, from, target, 
L)
 
  114     || hasEffectFromTo(state, ptypeo, from, target, 
R)
 
  115     || hasEffectFromTo(state, ptypeo, from, target, 
DL)
 
  116     || hasEffectFromTo(state, ptypeo, from, target, 
D)
 
  117     || hasEffectFromTo(state, ptypeo, from, target, 
DR);